AADSTS900144: The request body must contain the following parameter: 'grant_type'

My question:
I am trying to get access token but I am stuck with this error:

AADSTS900144: The request body must contain the following parameter: ‘grant_type’.

Details (like screenshots):

How I found the problem:
I am trying to create an API for integrating SharePoint with Control-M. I came across this video and followed through: How To Test SharePoint Online REST API Using Postman - YouTube

I have inputted ‘grant_type’ correctly even before the tutor notices the typo, but upon sending the request, I still get AADSTS900144 error.

I’ve already tried:

  1. Placing ‘grant_type’ and all variables on Params, it resulted to a different error:

AADSTS900561: The endpoint only accepts POST requests. Received a GET request.

So I tried to change the request to POST, but it returned the previous error:

AADSTS900144: The request body must contain the following parameter: ‘grant_type’

  1. I also tried other solutions from forums such as allow third-party cookies. After restarting the browser, it still yield the same error (AADSTS900144: The request body must contain the following parameter: ‘grant_type’.)

  2. I also tried placing all those variables through x-www-form-urlencoded, but still gives me the same error (AADSTS900144: The request body must contain the following parameter: ‘grant_type’.)

  3. I tried to redo the steps - delete the permissions from Site Collection App Permissions, delete the requests (from Postman), then start again as clean slate. But, still stuck at the same spot.

Is there anything that should be done from SharePoint side? Is my endpoint correct? (I am using my SharePoint provided by the company)

PS: I am using the web-based Postman

Thanks in advance!

From what I’m finding online, the outgoing content type header must be set to Content-Type: application/x-www-form-urlencoded … can you confirm that this is being set properly in the Headers section of the Postman interface? Can you also post a screenshot of the Postman console and expand the outgoing request to make sure it’s actually setting this properly?

1 Like

I got this fixed by using the Desktop App :sweat_smile:

I’ve been using the latest version of Postman Desktop, v10.6.7, and I get the same problem. I’ve heard from a co-worker that uninstalling and then re-installing might help, but I’d prefer not to do that if not necessary.

If anyone has any ideas, I’m open to trying them. BTW @ianthepostmanaut , the Headers section of Postman only shows up once you start to run a New Request. I’m getting this error after pressing the Get New Access Token button. So, that option isn’t available.

Up until a week ago, I was not having this issue…I did not change any settings within my Configure New Token settings…it just stopped working.

Update: 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.

2 Likes

Had also stuck here.
The main issue I’ve found - is the mistake on guide videos.

Should be chosen ‘x-www-form-urlencoded’ Body type, and not ‘form-data’.

image

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.