The script below will give you a report of all the Microsoft Teams and details about the connected SharePoint sites in a Microsoft 365 Tenancy. It just requires the Microsoft Teams PowerShell Module and the SharePoint Online PnP PowerShell Module. It requires a user account to have the minimum Office 365 admin roles Teams Service Administrator and SharePoint Administrator.

It writes to a CSV the following properties: DisplayName, Channels, “Team members”, Owners, Guests, Privacy, Status, Description, Classification, “Group ID”, MailNickName, “Connected SP Site”, “Storage Used”, “Num Of Files”

Often the roadblock for getting all this information together on report is that it usually requires using Microsoft Graph and this can be complicated with generating an access token and the various Microsoft Graph permission levels that need to be assigned by a Tenant admin. My script gets around this by accessing a special SharePoint system list called DO_NOT_DELETE_SPLIST_TENANTADMIN_AGGREGATED_SITECOLLECTIONS on your SharePoint Online Admin Site Here many properties of the Teams connected SharePoint site i.e. Url, Num of Files, Storage Used and many more properties are exposed and could be potentially be added to the script to be reported on.

Some of the Information in the Report is available in the Teams Admin Centre but this does not show information about the connected SharePoint site.

Please let me know if you have any further comments, need any assistance or there are any missing properties that you would like me to try and add to the report?

Leave a Reply