从本地Visual Studio运行时无法访问Azure Key Vault

时间:2020-01-17 13:59:29

标签: azure azure-keyvault

在Visual Studio 2019中调试我们的应用程序时,我无法访问我们的Azure Key Vault。引发以下异常:

Parameters: Connection String: [No connection string specified] Exception Message: Tried to get token using Managed Service Identity. Unable to connect to the Managed Service Identity (MSI) endpoint. Please check that you are running on an Azure resource that has MSI setup

异常消息很明显。这是我尝试过的:

  • 我是否正确配置了Managed Service Identity?是的,我有。
  • 我已经登录了吗?是的,我有az login命令。
  • 我是否已验证当前登录的用户和密钥库在同一预订中?是的,我有。
  • 我是否检查过我是否正在Visual Studio中以Azure Service Authentication的正确用户身份执行应用程序?是的,我有。

奇怪的是,当我使用dotnet run运行应用程序时,一切都按预期运行。尝试使用Azure CLI揭秘秘密也可以。

对于如何解决此问题的其他建议,我们深表感谢。

0 个答案:

没有答案