How to resolve Failed to query service endpoint api: https://management.azure.com//subscriptions/ Error- The remote server returned an error: (403)
How to resolve Failed to query service endpoint api: https://management.azure.com//subscriptions/ Error- The remote server returned an error: (403)
我正在尝试从 VSTS 为 CICD 管道设置 Azure 服务管理器连接,但它失败了。我已经对 Azure 进行了以下更改。
- 通过 Azure Active Directory 创建应用程序
- 已创建密钥(对于 azure 服务主体密钥)
- 为创建的应用程序提供对用户(Azure 帐户)的完全访问权限
- 收集了所有详细信息 - 客户端 ID、租户 ID 和订阅 ID
- 在 VSTS 中提供了所有这些详细信息以设置连接
当我点击验证连接时。它给出以下错误 -
Failed to query service endpoint api:
https://management.azure.com//subscriptions/?api-version=2016-06-01.
Error Message: The remote server returned an error: (403) Forbidden..
下面是 VSTS 的屏幕截图 -
如果我遗漏了什么或指导我完成此 VSTS 到 Azure 连接的所有必需步骤,请告诉我。
您需要授予服务主体 Azure 订阅访问权限。
登录Azure门户->所有服务->订阅->单击您的订阅->访问控制(IAM)->添加角色分配->为您的服务主体分配角色
参考:
Manage access to Azure resources using RBAC and the Azure portal
我正在尝试从 VSTS 为 CICD 管道设置 Azure 服务管理器连接,但它失败了。我已经对 Azure 进行了以下更改。
- 通过 Azure Active Directory 创建应用程序
- 已创建密钥(对于 azure 服务主体密钥)
- 为创建的应用程序提供对用户(Azure 帐户)的完全访问权限
- 收集了所有详细信息 - 客户端 ID、租户 ID 和订阅 ID
- 在 VSTS 中提供了所有这些详细信息以设置连接
当我点击验证连接时。它给出以下错误 -
Failed to query service endpoint api: https://management.azure.com//subscriptions/?api-version=2016-06-01. Error Message: The remote server returned an error: (403) Forbidden..
下面是 VSTS 的屏幕截图 -
如果我遗漏了什么或指导我完成此 VSTS 到 Azure 连接的所有必需步骤,请告诉我。
您需要授予服务主体 Azure 订阅访问权限。
登录Azure门户->所有服务->订阅->单击您的订阅->访问控制(IAM)->添加角色分配->为您的服务主体分配角色
参考:
Manage access to Azure resources using RBAC and the Azure portal