Want an easy way to see Teams and SharePoint usage data in the same report? Then you have come to the right place.
This will be a halfway automatic process, as you need to manually download two reports from the Teams and SharePoint admin portals. It is possible to get most of the SharePoint data from the Graph API, but that’s not the case for Teams at this point in time.
Go to the SharePoint admin portal, and find the Active Sites menu. Here you click the export button to get a CSV file with SharePoint activity data for the last 180 days.
Next, you go to the Teams admin portal, where you look for the Usage Report menu. Here you want to run the “Teams usage” report. When clicking “Run report”, a CSV file will be generated and available under Downloads. Unfortunately, only data for the last 90 days are available.
So what you need to do before running the script is having an Azure App with Group.Read.All rights for the Graph request we use to find the teams SharePoint URL. The URL is the thing we use to tie the information from the two CSV files together.