OAuth auth-code flow with Postman, error AADSTS900144, must contain the parameter 'grant_type'

Kylie 1 Reputation point
2022-06-08T17:17:15.987+00:00

I have been trying to follow this page v2-oauth2-auth-code-flow using the Postman collection linked at the start of the page.

I am able to receive an authorization code from the api, but when attempting to get a token I receive the error: "AADSTS900144: The request body must contain the following parameter: 'grant_type'."

Other answers seem to point to this error being causes by either using json instead of urlencoding, or the 'grant_type' parameter being placed in the header instead of the body, but as far I can tell it is correct and placed in the body. I presume that this is formatted correctly since the collection is coming from Microsoft, is there any configuration I need to do in Postman beforehand or something else that seems off?

209596-screenshot-2022-06-08-110326.png

Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

2 answers

Sort by: Most helpful
  1. Johnnie 16 Reputation points
    2022-12-22T22:41:25.363+00:00

    After re-installing Postman and deleting my collection, I continued to have the same problem. I then noticed an option within the Configure New Token section of the Authorization tab, inside of the Client Authentication drop-down. Changing the selection from Send as Basic Auth header to Send client credentials in body fixed the issue.

    273473-image.png

    3 people found this answer helpful.

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.