0
votes

I am trying integrate Devops with another 3rd part system, but i tried to access Devops from postman using oAuth2.0, but it is always failing, throwing me a error {"Error":"invalid_client","ErrorDescription":"Invalid client auth token."}

Does Devops support oAuth? if so what i am missing so i got this error?

2
Please include your code.JJJ
There is no need to add a code for this. i followed the below article to register my application and copied the client id/client credentials and token url etc...to the Postman oAuth header part.Maniraj Jayaraj
What is Devops? Do you mean Azure Devops? What params are you using when requesting a token? Show your code and be thorough to improve your chances of getting help from the community.Josh
Thanks for the reply. But i did the same and received the error response. First, i registered my application through (app.vsaex.visualstudio.com/app/register) after registration i recieved the Client ID , CLient Secret and other URI details, when i try oAuth in Postman with these details , i receive the error responseManiraj Jayaraj

2 Answers

1
votes

The problem is that DevOps is using non standard headers for some reason. This causes the built in postman to not work. The way that I figured out to work around this is to input the Auth url directly into your browser. You can then extract the auth code from the callback URL. Then with that code, make a post to the token endpoint in postman https://app.vssps.visualstudio.com/oauth2/token

Use x-www-form-urlencoded body and fill out the following keys

                "client_assertion_type", "urn:ietf:params:oauth:client-assertion-type:jwt-bearer" 
                "client_assertion", your app secret
                "grant_type", "urn:ietf:params:oauth:grant-type:jwt-bearer" 
                "assertion", your auth code from previous step
                "redirect_uri", your callbackurl
0
votes

Azure DevOps supports oAuth. If you follow the steps in the link below to get an oAuth token, and type the token directly in Postman, you'll get a successful response:

https://github.com/Microsoft/azure-devops-auth-samples/tree/master/OAuthWebSample

enter image description here