Get details of externally shared files using API - onedrive for business

Copper Contributor

Hello,

 

We want to fetch details of externally shared files from each user's onedrive in Office 365, to know which files are shared externally and to which users. Is there any API available to fetch these details?

 

Thanks,

Anna Jhaveri

3 Replies

Hi@Anna Jhaveri 

 

You can easily see how people in your business are using One Drive. Activity Reports in the Microsoft 365 admin center helps you to get a report of activites and usage.

 

one drive.png

Please refer to below link for instruction.

https://docs.microsoft.com/en-us/office365/admin/activity-reports/onedrive-for-business-activity?vie...

 

Please also refer to step by step instruction explained here : https://www.c-sharpcorner.com/article/get-all-onedrive-users-activity-details-using-microsoft-graph-...

 

API URL : https://graph.microsoft.com/v1.0/reports/getOneDriveActivityUserDetail(period='D7')

 

Thank you

Dav,

 

 

 

Thanks @Deleted for the response.

 

I reviewed the API https://graph.microsoft.com/v1.0/reports/getOneDriveActivityUserDetail(period='D7') but it gives details of Shared Externally File Count, i would like to get more detailed report, i.e. which files are externally shared with which users. I want to generate a detailed report specifically for files shared externally.

 

Thanks,

Anna Jhaveri

Hi@Anna Jhaveri 

 

I think to some extent you will be able to view the detailed activity of the users. It is all to do with privacy and data protection rules (GDPR).

 

Thank you

Dav,