why /me/drive/SharedWithMe Returns "value": []

Lucas Matheus Rodrigues Brum 0 Reputation points

I'm getting it:

I'm getting it	
"error": {
		"code": "accessDenied",
		"message": "Access denied",
		"innerError": {
			"date": "2023-01-17T18:28:01",
			"request-id": "a96ef046-8d91-43d6-9092-f1cde276d736",
			"client-request-id": "a96ef046-8d91-43d6-9092-f1cde276d736"

When I make a request for this url:


But there are several files shared with me, I have tried these solutions, but I have not been successful:


Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,013 questions
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,328 questions
A Microsoft file hosting and synchronization service.
732 questions
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,211 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bhanu Kiran 3,526 Reputation points

    Hello @Lucas Matheus Rodrigues Brum,

    I was able to reproduce this issue when I have only provided files.read permission in the token.

    User's image

    But as per the documentation, while the /sharedWithMe request will succeed with Files.Read or Files.ReadWrite permissions, some properties may be missing. Additionally, without one of the All permissions, shared items returned from this API will not be accessible.

    So after giving the necessary permission as instructed in the document, I was able to get the results:

    User's image

    Please check and validate the same.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.