Generate SharePoint Owners, Members, and Visitors Report

Hello everyone,

I want to generate a list of all SharePoint sites in the tenant, showing the owners and members for each site, and, if possible, the visitors as well.

I have been experimenting with the following modules:

  • PnP.PowerShell

    • May work, but appears to require an enterprise application with Full Control permissions in SharePoint.

    Microsoft.Online.SharePoint.PowerShell (SPO)

    • Requires the user or application to have access to all SharePoint sites that should be included in the report.

    Microsoft Graph

    • I have not been able to retrieve all required data using Graph alone, or I have not yet found a way to do so.

I want to avoid requiring an application or user account with full write access to all SharePoint sites in the tenant.

Is it possible to access these data, without granting full access?

Any help or pointers would be greatly appreciated.

You’ll have to use PnP to retrieve all of the data you want, which requires an app registration with SharePoint > Sites.FullControl.All API permissions.

Once you have that, you can reference this PnP article to aid in creating your script:
Get membership report of site(s) within tenant | PnP Samples

As far as I’m aware, you have no method to avoid required an app reg without adding your user account as an owner/admin on every single site you want to report on, which I would tend to recommend against.