microsoft / azuredevopslabs

Learn how you can plan smartly, collaborate better, and ship faster with a set of modern development services with Azure DevOps.
https://www.azuredevopslabs.com
MIT License
806 stars 905 forks source link

Error creating ACR Service connection with Service Principal Bearer token #681

Open XtratusCloud opened 10 months ago

XtratusCloud commented 10 months ago

Executing the following request to the Azure DevOps REST API for the creation of a Service Connection of type ACR, the endpoint fails with the error "A valid refresh token for identity 1fd109e5-3592-7532-7532-9201-1b545d36bdb2 was not found."

POST: https://dev.azure.com/{{organization}}/{{projectName}}/_apis/serviceendpoint/endpoints/?api-version=7.1-preview.4 Headers:

Making the request with an Access Token from an Azure AD user, the request works correctly. In both cases, the credentials used have the following permissions (as at least).:

surajshenoy commented 8 months ago

Hi @XtratusCloud, Will you please let us know which lab from Azuredevopslabs page you are pointing to?. This will help us to provide you inputs on the concern

XtratusCloud commented 8 months ago

Hi @surajshenoy, the request and the issue reported is related to the DevOps REST API, and not related with Azuredevopslabs. Probably I have opened the incident in the wrong place.