I am encountering an issue while working with Azure Active Directory authentication. Specifically, I am receiving the following error message:
{“error”:”invalid_request”,”error_description”:”AADSTS900144: The request body must contain the following parameter: ‘grant_type’.}
Here is the context of my request:
Endpoint: https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token
Request Method: POST
Headers: “Content-Type” : “application/x-www-form-urlencoded”
Request Body:
{
"grant_type": "client_credentials",
"client_id": {client_id},
"client_secret": {client_secret},
"scope": "https://graph.microsoft.com/.default"
}
Can someone please guide me on how to correctly include the ‘grant_type’ parameter in the request body? Any examples or insights into what might be causing this issue would be greatly appreciated.
Thank you in advance for your help!
I have ensured that the request body includes other necessary parameters, but the ‘grant_type’ parameter seems to be missing or incorrectly specified.