Report on file and folder sharing in a SharePoint site

You can create a CSV file of every unique file, user, permission, and link on a given SharePoint site or OneDrive. This report helps you understand how sharing is used and if any files or folders are shared with guests. You must be a site admin to run the report. For more reporting options, see Microsoft Graph Data Connect.

When you run the report, you save the CSV file to a location you choose on the site. If you don't want site members to see the report, consider creating a folder with different permissions where only site owners can access the report.

The report might take some time to run depending on the size of the site. When the report finishes running, you receive an email with a link to the report.

Run the report for a SharePoint site

  1. Open the site where you want to run the report.

  2. On the Settings menu, select Site usage.

  3. In the Shared with external users section, select Run report.

  4. Choose a location to save the report, and then select Save.

Run the report for OneDrive

  1. From the Microsoft 365 app launcher, select the OneDrive tile.

  2. On the Settings menu, select OneDrive settings.

  3. Select More settings, and then select Run sharing report.

  4. Choose a location to save the report, and then select Save.

CSV format

For items shared with direct access, the report contains one row for each user and item combination. The report shows SharePoint groups, but not individual users inside them.

For items shared with a link, the report contains a row for each signed-in user who uses the link or receives the link through the sharing dialog. The report doesn't include links that are emailed directly but aren't clicked, or Anyone links.

The report contains the following columns:

Column Description
Resource Path The relative URL of the item
Item Type The type of item (web, folder, file, and so on)
Permission The permission level the user has on this item
User Name Friendly name of the user or group that has access to this item. If this is a sharing link, the user name is SharingLink
User E-mail The email address of the user who has access to this item. This is blank for SharePoint groups.
User or Group Type The type of user or group: Member (internal), Guest (external), SharePoint group, Security group, or Microsoft 365 group. (Member refers to a member in the directory, not a member of the site.)
Link ID The GUID of the sharing link if user name is Sharing Link
Link Type The type of link (Anonymous, Organization, Specific People) if user name is Sharing Link
AccessViaLinkID The Link ID used to access the item if a user's permission to an item is via a link.

Overview of Microsoft Graph Data Connect