Hi @Abhishek Jha ,
Thanks for reaching out.
I understand you are trying to call Azure AD devops build REST API using Azure AD access token and getting 203 error.
Yes, it is possible to call Azure Devops REST API using Azure AD access token.
The error "203 -Non-Authoritative Information" means that your access token has not right scopes to call the Azure Devops API.
Steps to call Azure Devops REST API using Azure AD access token as follows:
- Register the application in Azure AD.
- In the app's registration screen, Add a permission to access to the Devops APIs that your application needs.
- In the list of APIs, select the API Azure DevOps from Microsoft APIs.
- In the Delegated permissions section, select the user_impersonation in the list.
Permission is added as below:
To get the access token, First get the authorize code using authorize endpoint https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/authorize? with below parameters
Copy the short-lived authorization code from callback URL and get the access token using https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token
Make sure to use appropriate Azure DevOps resource id in the scope : 499b84ac-1321-427f-aa17-267ca6975798/user_impersonation to get the authorized access token to call Azure Devops REST API
Hope this will help.
Thanks,
Shweta
----------------------------------------------
Please remember to "Accept Answer" if answer helped you.