Sharepoint online display externally shared files from all teamsites

Occasional Contributor

Hi all,


I am looking for a way to display all externally shared files for all sharepoint online (team)sites.

So for one site I know you how to achieve this by going to the SharePoint site -> Site Usage -> Site Contents. Or


But how do I get this info for 100+ sites at once?





3 Replies
There is not a global feature to get that data so you have two options here:
(1) Look for a third party tool that provides this feature (Take a look at the Governance Tools provided by AvePoint, Sharegate, SysKit and others)
(2) Build it yourself using SPO APIs

It's fairly easy to do this via the Graph, I have a sample script that does it across all ODFB site collections here:


Just adapt it to run against SPO SCs instead.

Thanks for replying both, @Vasil Michev I will give it a try!