OneDrive for Business viewing files and shares

Occasional Contributor

Good morning,


I have had a request today from my companies owner, he want to be able to view all the physical files in Onedrive for Business and who they have been shared with. Is this possible? Where do I even start? I can see the users and how many files, but no the actual files......All help and direction is appreciated. 

4 Replies
I’ll guess you’ll have to create a powershell script, and make an account owner of all onedrive sites then do a search for all files and the sharing status and do a report! I’m not sure if there’s any API’s to use here also! Haven’t found any script for this, but I’ll try find something!


You can run a content search with the corresponding keywords to generate a list of either internally or externally shared files, or both:


Yay, didn’t know that one!

Running this now, thanks@Vasil Michev