Search code examples
azuremicrosoft-graph-api

Bad request (400) in Postman with Graph API beta


I am trying to execute a graph api request but it returns a bad request. It has all the permissions indicated in the official documentation and I don't see where it could be wrong in its syntax. Get token: enter image description here

The request failed: enter image description here enter image description here enter image description here


Solution

  • Your using a service principal to authentication eg the client credentials flow so the /me endpoint isn't valid (which is what that error message is telling you). You need to target a specific user eg

    /users/{id | userPrincipalName}/profile