What is the replacement for `GET /me/drive/sharedWithMe

Meg Gotshall 0 Reputation points
2025-11-18T11:46:00.7633333+00:00

The Graph API GET /me/drive/sharedWithMe is marked as deprecated. What is the recommended replacement?

The Learn AI agent suggested that "The recommended replacement for this API is to use the driveItems returned from the sharedWithMe method." Does this mean that the API itself will not be removed, but only the response model will change?

Microsoft 365 and Office | SharePoint | Development
0 comments No comments

2 answers

Sort by: Most helpful
  1. Jayden-P 26,280 Reputation points Microsoft External Staff Moderator
    2025-11-18T12:51:36.38+00:00

    Hi @Meg Gotshall

    Thank you for posting your question in the Microsoft Q&A forum.

    From this official document, it stated that sharedWithMe API is deprecated and will stop returning data after November 2027.

    It will be removed and no longer return any data from the calls.

    At this moment, Microsoft has not announced any alternative for this deprecated API.

    User's image

    You can read here for more details: drive: sharedWithMe (deprecated) - Microsoft Graph v1.0 | Microsoft Learn

    I hope this information helps.


    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.

    Was this answer helpful?

    1 person found this answer helpful.

  2. Jonas H 0 Reputation points
    2026-05-15T14:29:07.0833333+00:00

    Hi,
    we ran into the same problem and were slightly disappointed / annoyed that there wasn't a clear migration plan.

    Our current workaround/approach is to use the search API using a path-filter like this:

    query = 'path:"https://site-name-xyz.sharepoint.com/personal/"'
    response = client.post(
                "/v1.0/search/query",
                json={
                    "requests": [
                        {
                            "entityTypes": ["driveItem"],
                            "query": {"queryString": query},
                            "from": offset,
                            "size": size,
                        }
                    ]
                },
            )
    
    

    This query seems to find onedrive files and folders shared with the user, teams files shared in personal chats, and the drive-items of the user itself.
    You could also extend the query to filter for folders, or exclude the users files.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.