List of files and folders shared internally


Does anyone know if and when we will be able to generate an exportable list of files and folders shared internally from a SharePoint site or OneDrive? We need this for our internal governance so that site owners can determine whether sharing of given file or folder is still relevant.


Right now it is very cumbersome to determine if something is shared, as there are no visual cues online or in file explorer, no "shared by us" and there is no way to run a report. This is very suboptimal in a gdpr world, where we need to be able to easily adjust access at any given time to only those who need access.


If anyone knows of a solid way of obtaining this information otherwise (via script or 3rd party tools), please let me know. I know that it can be done by trawling the audit log, but this is not very robust (or user friendly).

8 Replies

Hi @Allan With Sørensen ,


I would suggest looking at the Sharing Reports feature:


This will generate CSV's that contain a row for every user, permission, item and link in a given site or OneDrive. Hope that helps!

Stephen Rice

Senior Program Manager, OneDrive

Hello Stephen, thank you for your reply!

As far as I can see, those reports only show external sharing, correct? I'm looking for internal sharing reports. I've seen comments that internal sharing would come to these reports, but so far haven't noticed anything.

It would be a great help if SharePoint would have "Shared By Us" much like OneDrive as well as visual indicators that show if a given folder is shared. This is currently not the case and this combined with the lack of internal sharing reports means it's a bit messy trying to ascertain what has or hasn't been shared and with whom.

Again, thank you kindly for your reply, it is much appreciated.
best response confirmed by Allan With Sørensen (Contributor)

Hi @Allan With Sørensen,


The report I linked above should include internal sharing as well. It will only report items that have broken inheritance though so on a brand new SharePoint Site for example, you'll only see three rows for the Members, Visitors & Owners groups against the root web.


That's a great suggestion and I'll be sure to pass it along to the team! Thanks!


Stephen Rice

Senior Program Manager, OneDrive

Hmm, okay, so how would that work if it's something shared from Teams? I mean in that case, it's not something where any kind of inheritance can be broken, since it has its own site collection. Also, wouldn't internal sharing of a file or folder always "break inheritance" in some way, since you are explicitly sharing a file with someone who is not already a member of the specific team/sharepoint site. We don't care about sharing links created for those who are already members, only those who are not.

While I'm at it, we would also really like some reports for administrators about what is shared and with whom (internally/externally/anonymously). It's not like it's a secret for administrators, we could already see it in the audit log. Something that could be pulled via the graph api would be a start, since it already has the possibility of pulling external sharing, but are you saying that the office graph api also supports internal sharing, as long as we're talking about broken inheritance?

Hi @Allan With Sørensen,


By "Shared from Teams", do you mean that the user added the file to a Teams-connected site? In that case, when you get the sharing report for that site, you'd see the Teams membership groups as having access to the entire library.


Yes, internal sharing of a single file or folder will always break inheritance.


For broader reporting, auditing is the best option of what we have today. I am not 100% sure what is and isn't in Graph around this space. Thanks!


Stephen Rice

Senior Program Manager, OneDrive

@Stephen Rice Hi again. We were able to confirm, that the report does indeed list internal sharing, so thank you for the help on that. And yes, what I meant was a Teams connected SharePoint site, so your explanation made sense.


What I want to ask now, is if it's possible to run a script that will extract that same information? For governance reasons, we'd like to have an overview of everything that's shared in our tenant from Teams connected Sharepoint sites. If this can be done by extracting one csv file per site, that's fine, but it would be even better if the data could be extracted via an API and piped into a database or whatever we choose.



Hi Allan,

There is no easy way to do this today unfortunately. We do know there's a desire though and it's something the team is investigating & looking at. Thanks!

Stephen Rice
Senior Program Manager, OneDrive
Thanks for the reply, will be looking forward to this being possible one day :)