Share via

fetch shared information.

Glenn Maxwell 13,761 Reputation points
2024-11-29T05:37:13.87+00:00

Hi All,

I have a requirement to pull information from one of my user's OneDrive accounts. Specifically, I need to retrieve details about the files and folders the user has shared with any internal or external users, including their respective OneDrive paths. Could you please guide me on how to fetch this information? Lets say , here is the OneDrive URL:

https://contoso-my.sharepoint.com/personal/glenn_maxwell_contoso_com

Exchange Online
Exchange Online

A cloud-based service included in Microsoft 365, delivering scalable messaging and collaboration features with simplified management and automatic updates.

Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft 365 and Office | OneDrive | For business | Windows
0 comments No comments

Answer accepted by question author

RaytheonXie_MSFT 40,496 Reputation points Microsoft External Staff
2024-11-29T07:31:26.15+00:00

Hi @Glenn Maxwell,

You can create a CSV file of the share information by generate a Sharing Report. You could go to Settings on top (cog wheel), OneDrive settings, More settings and finally under the Manage access section, click Run sharing report. You will then be asked to select where to store the report

Generating a OneDrive for Business Sharing Report

The report may take some time to run depending on the size of the site. Here is the document for reference

https://learn.microsoft.com/en-us/sharepoint/sharing-reports

Additionally, you can also refer to reportroot-getonedriveusagefilecounts if you need to use graph api


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 additional answer

Sort by: Most helpful
  1. Vasil Michev 127K Reputation points MVP Volunteer Moderator
    2024-11-29T07:18:53.7633333+00:00

    Was this answer helpful?

    0 comments No comments

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.