I am able to connect to MS Graph API through the Graph Explorer, and using the SDK in C#. However, when I use the same information as the SDK in Postman, I get a 400 error. I am POSTing to https://login.microsoftonline.com/TENANTID/oauth2/v2.0/token HTTP/1.1 (with our tenant id) and using x-www-form-urlencoded to send:
- client_id=OURCLIENTID
- scope=https://graph.microsoft.com/.default
- client_secret=OURCLIENTSECRET
- grant_type=client_credentials
The response is always a 404.
I based this in the Get Token Request call from Microsoft(https://docs.microsoft.com/en-us/graph/auth-v2-service#token-request), so I am not sure why it is not working. Any help would be appreciated.