fetch shared information.

Glenn Maxwell 11,941 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

OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
1,199 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,975 questions
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,636 questions
OneDrive Management
OneDrive Management
OneDrive: A Microsoft file hosting and synchronization service.Management: The act or process of organizing, handling, directing or controlling something.
1,297 questions
0 comments No comments
{count} votes

Accepted answer
  1. RaytheonXie_MSFT 36,896 Reputation points Microsoft Vendor
    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.


1 additional answer

Sort by: Most helpful
  1. Vasil Michev 110.3K Reputation points MVP
    2024-11-29T07:18:53.7633333+00:00
    0 comments No comments

Your answer

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