See all the files shared with a specific user

Oliver Martin 6 Reputation points
2021-10-26T11:46:37.213+00:00

Dear community,

As we have many department changes withing our company we need to know which files are shared with which user in order to be able to clean things up.

Is there a way to see all the files shared with a specific user?

I can see the files shared with me by using the following within graph: https://graph.microsoft.com/v1.0/me/drive/sharedwithme

We want to be able to do this for another user. Is there a possibility within Microsoft (graph) to do this, the following doesn't work as 'sharedWithMe' only works for your own user, even with the Site.Read.All and Files.Read.All permissions: https://graph.microsoft.com/v1.0/{userid}/drive/sharedwithme

The Compliance Portal has some capabilities but the timeframe is too short to clean up shares from over the years.

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

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 37,216 Reputation points
    2021-10-28T07:13:06.113+00:00

    Hi, dear @Oliver Martin

    Calling the /users/{user id} endpoint to list items shared with a specific user is currently not supported. Only call /me endpoints are supported to list items shared with yourself.

    So based on your demands, I suggest you submit a user voice to add a support request for the /users/{user id} endpoint, and I will vote for you.


    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.

    1 person found this answer helpful.