Home > database >  Azure AD access token from postman
Azure AD access token from postman

Time:12-22

Today, I have an issue getting an Azure AD access token from Postman. This is while it was working before for the same app and other apps I am working on. But none of them are working today. I was working correctly, but now it shows me this error:

Error: AADSTS900144: The request body must contain the following parameter: 'client_id'

I use enter image description here

enter image description here

CodePudding user response:

I tried to reproduce the same in my environment and got below results

You can get values of auth URL and access token URL from your Azure AD application that varies based on supported account type like below:

Go to Azure Portal -> Azure Active Directory -> App registrations -> Your App -> Overview -> Endpoints

enter image description here

Now I added environment variables in Postman by defining them like below:

enter image description here

Make sure to select the correct Environment while requesting for token with variables.

I filled the required details same as you to get the access token like below:

enter image description here

When I selected Get New Access Token, I got the token successfully as below:

enter image description here

The error usually occurs if you missed including client_id while acquiring access token.

I changed client_id parameter to blank in variables like below:

enter image description here

When I tried to get access token again, I got same error as you like below:

enter image description here

To resolve the error, make sure to pass client_id value in right environment and save it.

CodePudding user response:

I found out why it's acting like this: I checked my friend's PC, and it was working there! The issue was the last update of Postman. They have changed something in authorization. just change the Client Authentication to Send client credentials in body and it will work. enter image description here

  • Related