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:
- 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’
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’.)
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’.)
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!