1
votes

I am trying to setup Azure Service Manager connection from VSTS for CICD Pipeline but it is failing. I have already made below changes to Azure.

  1. Created Application thorough Azure Active Directory
  2. Created Secret Key (For azure service principal key)
  3. Provided full access to user (azure account) for created application
  4. Collected all details - client id, tenant id and subscription id
  5. Provided all these details in VSTS to setup connection

When I click verify connection. it gives below error -

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..

below is screenshot of VSTS -

enter image description here

Please let me know if I missed anything OR guide me all required steps to complete this VSTS to Azure connection.

1
Have you added access to the Azure subscription / resource group for the created application?juunas

1 Answers

1
votes

You need to grant the service principal Azure subscription access permission.

Login Azure portal->All service->Subscriptions->click your subscription->Access control(IAM)->Add role assignment->assign a role to your service principal

enter image description here

Reference:

Manage access to Azure resources using RBAC and the Azure portal