Forum Discussion
Jose_Carlos1835
Nov 13, 2023Copper Contributor
Trouble retrieving Authorization Code using Oauth2 in Azure devops
I'm trying use OAuth2 autentication method as microsoft learn expose in this url https://learn.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/azure-devops-oauth?view=azure-devo...
Kidd_Ip
Jun 15, 2025MVP
Any luck on this:
- Ensure Redirect URI Matches – The callback URL must exactly match the one registered in your app settings. If there's a mismatch, Azure DevOps will reject the request.
- Use Correct Grant Type – The authorization endpoint (/oauth2/authorize) should use response_type=code, not Assertion. The token endpoint (/oauth2/token) should use grant_type=authorization_code.
- Check Scope Formatting – Ensure the scope parameter is correctly formatted (vso.build_execute should be space-separated if multiple scopes are used).
- Verify Client ID and Secret – Double-check that your client_id and client_secret are correctly passed in the request.