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

%3CLINGO-SUB%20id%3D%22lingo-sub-686368%22%20slang%3D%22en-US%22%3EGet%20details%20of%20externally%20shared%20files%20using%20API%20-%20onedrive%20for%20business%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-686368%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20want%20to%20fetch%20details%20of%20externally%20shared%20files%20from%20each%20user's%20onedrive%20in%20Office%20365%2C%20to%20know%20which%20files%20are%20shared%20externally%20and%20to%20which%20users.%20Is%20there%20any%20API%20available%20to%20fetch%20these%20details%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3EAnna%20Jhaveri%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-686368%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOneDrive%20for%20Business%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-686503%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20details%20of%20externally%20shared%20files%20using%20API%20-%20onedrive%20for%20business%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-686503%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F61420%22%20target%3D%22_blank%22%3E%40Anna%20Jhaveri%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20easily%20see%20how%20people%20in%20your%20business%20are%20using%20One%20Drive.%20Activity%20Reports%20in%20the%20Microsoft%20365%20admin%20center%20helps%20you%20to%20get%20a%20report%20of%20activites%20and%20usage.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20343px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F117875iA65F0D3B69EA3269%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22one%20drive.png%22%20title%3D%22one%20drive.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EPlease%20refer%20to%20below%20link%20for%20instruction.%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Foffice365%2Fadmin%2Factivity-reports%2Fonedrive-for-business-activity%3Fview%3Do365-worldwide%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Foffice365%2Fadmin%2Factivity-reports%2Fonedrive-for-business-activity%3Fview%3Do365-worldwide%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20also%20refer%20to%20step%20by%20step%20instruction%20explained%20here%20%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.c-sharpcorner.com%2Farticle%2Fget-all-onedrive-users-activity-details-using-microsoft-graph-api%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.c-sharpcorner.com%2Farticle%2Fget-all-onedrive-users-activity-details-using-microsoft-graph-api%2F%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAPI%20URL%20%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Freports%2FgetOneDriveActivityUserDetail(period%3D'D7')%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Freports%2FgetOneDriveActivityUserDetail(period%3D'D7')%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%3C%2FP%3E%3CP%3EDav%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-686724%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20details%20of%20externally%20shared%20files%20using%20API%20-%20onedrive%20for%20business%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-686724%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F340070%22%20target%3D%22_blank%22%3E%40Dav1988%3C%2FA%3E%26nbsp%3Bfor%20the%20response.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20reviewed%20the%20API%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Freports%2FgetOneDriveActivityUserDetail(period%3D'D7')%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Freports%2FgetOneDriveActivityUserDetail(period%3D'D7')%3C%2FA%3E%26nbsp%3Bbut%20it%20gives%20details%20of%26nbsp%3BShared%20Externally%20File%20Count%2C%20i%20would%20like%20to%20get%20more%20detailed%20report%2C%20i.e.%20which%20files%20are%20externally%20shared%20with%20which%20users.%20I%20want%20to%20generate%20a%20detailed%20report%20specifically%20for%20files%20shared%20externally.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3EAnna%20Jhaveri%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-686741%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20details%20of%20externally%20shared%20files%20using%20API%20-%20onedrive%20for%20business%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-686741%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F61420%22%20target%3D%22_blank%22%3E%40Anna%20Jhaveri%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20think%20to%20some%20extent%20you%20will%20be%20able%20to%20view%20the%20detailed%20activity%20of%20the%20users.%20It%20is%20all%20to%20do%20with%20privacy%20and%20data%20protection%20rules%20(GDPR).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%3C%2FP%3E%3CP%3EDav%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New 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
Highlighted

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,

 

 

 

Highlighted

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,