【发布时间】:2019-08-17 10:07:50
【问题描述】:
我有一个 powershell 脚本,它尝试使用此命令检索存储在 Azure 密钥保管库中的机密。
$password = (Get-AzureKeyVaultSecret -vaultName $vaultName -name $secretName).SecretValueText
当我在本地执行我的 powershell 脚本时,它工作得非常好。但是,当我尝试在 Azure Devops 上执行相同操作时,它会出现以下错误。
[error]Operation returned an invalid status code 'Forbidden'
我觉得这不是访问策略问题,因为我能够使用本地运行的 powershell 脚本成功地在我的保管库上执行读/写。
【问题讨论】:
-
您的密钥库是否仅限于某些 IP 地址范围?
-
@DanielMann 我已允许从所有网络访问。
标签: azure powershell azure-devops azure-resource-manager azure-keyvault