What are other settings needed in addition to access token in order to get Microsoft Graph's OneDrive API to return data

Wei Wen 1,096 Reputation points
2022-04-07T02:25:13.06+00:00

I am experimenting with Microsoft Graph's OneDrive API. In my android app, I used Microsoft SSO to sign the user in. If the user successfully signed in, I got a token which is actually AccessTokenRecord class.

To simplify testing, I used Postman and the AccessTokenRecord's mSecret as the access token in Postman. I tried a few APIs, e.g. https://graph.microsoft.com/v1.0/me/drive/sharedWithMe, but got only errors with code "itemNotFound". I checked my OneDrive in a url and found that I did have files shared with me.

My question is: Is the access token I used in Postman the correct one? Are there any other information that I need to pass in Postman, for example, request headers?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,130 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,767 questions
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 39,101 Reputation points
    2022-04-07T07:06:19.74+00:00

    Hi @Wei Wen

    Use the Graph Explorer test to see how it turns out.

    190827-image.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful