Graph Explorer Token vs App only or user based

JRFM 1 Reputation point
2021-04-01T11:25:53.52+00:00

Hi, I am wondering what the discrepancy is between the graph explorer access token and the token I am retrieving using postman & my .NET web api.

When using the Graph explorer I am unhindered when running queries. However, when I use the same user/password on postman suddenly those queries do not work.

I have used jwt.ms to look at the token scopes/permissions and the tokens I retrieve from postman have all permissions and more. I have also consented to the permissions on Azure.

Many of the queries I run on postman work but the moment I do a POST such as where I am trying to add a folder to a SharePoint site, I only receive a Bad Request with the message Invalid request; however, grab the token from the Graph Explorer and use it to make the same request in postman and everything works fine.

The query is as so: https://graph.microsoft.com/v1.0/sites/{siteId}/drives/{driveId}/root/children HttpMethod: POST

I have dug around the ms docs but cannot seem to figure out why only the graph explorer access token works.

I have tried with an App-only access token (the preferred choice). I have tried on behalf of the user.

The only impediment is the Access Token.

Additionally, the company admin IT himself has no answers and has not been able to help. We are both puzzled.

I appreciate all or any help.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,645 questions
{count} votes