Hi there,
this is regarding Microsoft Graph. I'm trying to get a Bearer token but I always get an error message when loading stating:
"error":"invalid_request","error_description":"AADSTS900144: The request body must contain the following parameter: 'grant_type'
I attached a couple of screenshots of the configuraiton. And here's the full error message:
Request Start
Request-Url:
https://login.microsoftonline.com/[I SANITIZED IT]/oauth2/v2.0/token
Request-Header:
Scope: https://graph.microsoft.com/.default
Request-Body:
{
"Grant_Type":"client_credentials",
"client_id":"[I SANITIZED IT]",
"client_secret":"[I SANITIZED IT]",
"resource":"https://graph.microsoft.com"
}
Request End
Response Start
Response-Code:
BadRequest (400)
Response-Body:
{"error":"invalid_request","error_description":"AADSTS900144: The request body must contain the following parameter: 'grant_type'.\r\nTrace ID: 0768443e-3dcf-41ae-b29c-3bf5c6b66c00\r\nCorrelation ID: 08fffc80-37ae-4651-b6b0-a1de65076cd6\r\nTimestamp: 2022-10-05 09:51:53Z","error_codes":[900144],"timestamp":"2022-10-05 09:51:53Z","trace_id":"0768443e-3dcf-41ae-b29c-3bf5c6b66c00","correlation_id":"08fffc80-37ae-4651-b6b0-a1de65076cd6","error_uri":"https://login.microsoftonline.com/error?code=900144"}
Response-Header:
Cache-Control: no-store, no-cache
Pragma: no-cache
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
P3P: CP="DSP CUR OTPi IND OTRi ONL FIN"
x-ms-request-id: 0768443e-3dcf-41ae-b29c-3bf5c6b66c00
x-ms-ests-server: 2.1.13777.6 - NEULR2 ProdSlices
X-XSS-Protection: 0
Set-Cookie: fpc=AvbOfFjwoSJMo6ALHk8VnPU; expires=Fri, 04-Nov-2022 09:51:53 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd; path=/; secure; httponly, stsservicecookie=estsfd; path=/; secure; httponly
Date: Wed, 05 Oct 2022 09:51:52 GMT
Response End
Exceptions:
System.Exception: Rest service call failed. Http code BadRequest (400). Inspect log to get more information.
I've tried every combination and syntaxes I could think of.
In Postman it works without issues.
Has anyone ever set up a connection/data source to retrieve a Graph auth token?
Thanks for your help.