Home

How do I get a list of all O4B files shared with others - for all users

%3CLINGO-SUB%20id%3D%22lingo-sub-142674%22%20slang%3D%22en-US%22%3EHow%20do%20I%20get%20a%20list%20of%20all%20O4B%20files%20shared%20with%20others%20-%20for%20all%20users%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-142674%22%20slang%3D%22en-US%22%3E%3CP%3EI%20need%20to%20get%20a%20list%20of%20all%20files%20all%20users%20shared%20with%20others%26nbsp%3Bsorted%20by%20user%20and%20then%20by%20file%20URL.%20The%20tenant%20has%20more%20than%20400%20users.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAudit%20log%20search%20does%20not%20work%20because%20it%20does%20not%20show%20shared%20files%20where%20sharing%20started%20before%20audit%20log%20start%20date%20and%20it%20does%20not%20show%20file%20name%20and%20path.%20I%20also%20found%20this%20script%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgallery.technet.microsoft.com%2Fscriptcenter%2FHow-to-use-OneDrive-Rest-5b31cf78%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgallery.technet.microsoft.com%2Fscriptcenter%2FHow-to-use-OneDrive-Rest-5b31cf78%3C%2FA%3E%20But%20it%20seems%20to%20work%20for%20one%20particular%20user%20only.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECan%20anybody%20help%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-142674%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%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-142957%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20I%20get%20a%20list%20of%20all%20O4B%20files%20shared%20with%20others%20-%20for%20all%20users%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-142957%22%20slang%3D%22en-US%22%3E%3CP%3EIt%20does%2C%20and%20it%20can%20give%20you%20the%20actual%20item%20as%20well%2C%20if%20you%20want%20to%20export%20it%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-142729%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20I%20get%20a%20list%20of%20all%20O4B%20files%20shared%20with%20others%20-%20for%20all%20users%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-142729%22%20slang%3D%22en-US%22%3ENot%20sure%20it%20gives%20URL%20etc.%20to%20the%20file%20thou.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-142725%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20I%20get%20a%20list%20of%20all%20O4B%20files%20shared%20with%20others%20-%20for%20all%20users%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-142725%22%20slang%3D%22en-US%22%3EThat%20was%20my%20first%20thought%20but%20I%20couldn't%20figure%20out%20how%20you%20would%20call%20that.%20Good%20info%20for%20future%20thou.%20Thanks%20%3A).%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-142720%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20I%20get%20a%20list%20of%20all%20O4B%20files%20shared%20with%20others%20-%20for%20all%20users%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-142720%22%20slang%3D%22en-US%22%3E%3CP%3EUm%2C%20why%20don't%20you%20simply%20use%20eDiscovery%2Fcontent%20search%20and%20the%20SharedWithUsersOWSUser%20(internal)%20or%20the%20ViewableByExternalUsers%20(external)%26nbsp%3Bkeyword%3F%20More%20info%20here%3A%20%3CA%20href%3D%22https%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2Fkeyword-queries-and-search-conditions-for-content-search-c4639c2e-7223-4302-8e0d-b6e10f1c3be3%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2Fkeyword-queries-and-search-conditions-for-content-search-c4639c2e-7223-4302-8e0d-b6e10f1c3be3%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-142697%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20I%20get%20a%20list%20of%20all%20O4B%20files%20shared%20with%20others%20-%20for%20all%20users%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-142697%22%20slang%3D%22en-US%22%3EYou%20can%20get%20all%20the%20ODFBs%20through%20PowerShell%20and%20then%20use%20the%20script%20you%20have%20found.%20For%20instance%2C%20the%20following%20support%20article%20provides%20a%20PowerShell%20script%20to%20get%20all%20the%20ODFBs%20in%20an%20Office%20365%20subscription%3A%20%3CA%20href%3D%22https%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2Fhow-to-display-a-list-of-onedrive-for-business-site-collections-8e200cb2-c768-49cb-88ec-53493e8ad80a%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2Fhow-to-display-a-list-of-onedrive-for-business-site-collections-8e200cb2-c768-49cb-88ec-53493e8ad80a%3C%2FA%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-142676%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20I%20get%20a%20list%20of%20all%20O4B%20files%20shared%20with%20others%20-%20for%20all%20users%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-142676%22%20slang%3D%22en-US%22%3ECan't%20use%20that%20function%20in%20that%20script%20and%20pipe%20to%20it%20from%20the%20get%20command%20that%20gets%20all%20your%20onedrive%20sites%3F%3C%2FLINGO-BODY%3E
Highlighted
Robert K
Contributor

I need to get a list of all files all users shared with others sorted by user and then by file URL. The tenant has more than 400 users.

 

Audit log search does not work because it does not show shared files where sharing started before audit log start date and it does not show file name and path. I also found this script: https://gallery.technet.microsoft.com/scriptcenter/How-to-use-OneDrive-Rest-5b31cf78 But it seems to work for one particular user only. 

 

Can anybody help?

6 Replies
Can't use that function in that script and pipe to it from the get command that gets all your onedrive sites?
You can get all the ODFBs through PowerShell and then use the script you have found. For instance, the following support article provides a PowerShell script to get all the ODFBs in an Office 365 subscription: https://support.office.com/en-us/article/how-to-display-a-list-of-onedrive-for-business-site-collect...

Um, why don't you simply use eDiscovery/content search and the SharedWithUsersOWSUser (internal) or the ViewableByExternalUsers (external) keyword? More info here: https://support.office.com/en-us/article/keyword-queries-and-search-conditions-for-content-search-c4...

That was my first thought but I couldn't figure out how you would call that. Good info for future thou. Thanks :).
Not sure it gives URL etc. to the file thou.

It does, and it can give you the actual item as well, if you want to export it :)

Related Conversations
Creating A Sublist
zjohnson in Excel on
5 Replies
OneDrive taking up space on C drive
Tim Hunter in OneDrive for Business on
8 Replies
SharePoint integration in Teams
Alexandre Decaesteker in Microsoft Teams AMA on
10 Replies