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'
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
Now I added environment variables in Postman by defining them like below:
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:
When I selected Get New Access Token, I got the token
successfully as below:
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:
When I tried to get access token again, I got same error as you like below:
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.