I'm using Azure DevOps services to create service connection but getting errors. I am trying to follow the steps outlined here
These are the steps I followed:
Add a new AAD app registration with secret.
In DevOps, from project settings create a new service connection.
- Connection type: ARM
- Authentication method: Serviceprincipal (manual)
- Env: Azure Cloud
- Scope: Subscription
- Subscription Id: xxx
- Subscription name: xxx
- service principal id: xxx
- service principal key: xxx
- Tenant Id: xxx
When I click Verify, I get this error:
Failed to query service connection API: 'https://management.azure.com/subscriptions/xxx?api-version=2016-06-01'. Status Code: 'Forbidden', Response from server: '{"error":{"code":"AuthorizationFailed","message":"The client 'abc' with object id 'abc' does not have authorization to perform action 'Microsoft.Resources/subscriptions/read' over scope '/subscriptions/xxx' or the scope is invalid. If access was recently granted, please refresh your credentials."}}'
So,
Does this mean, my app registration need to have read permission on this xxx subscription? Can't I scope it to resource group level? If yes, how can I do that as I don't see that option in portal? Thanks!





