In one of my previous blog posts I questioned if you have enabled self service Teams creation for everyone or not. I also talked about what can happen if you do this (create a chaos in your tenant), but also talked about what can be a consequence when you disable it (people don’t use Teams or use other ways to communicate and collaborate). So having a good balance in governing your tenant is a good choice.

Last week I sat down with one of my clients, a very big multinational spanning every region in the world. We talked about how Microsoft Teams usage have increased within their company since they started using it. One of the key things when they started giving access to their users was to enable self service Teams creation for everyone. This using the out of the box creation and surfacing the available Teams. The most interesting conclusion in my opinion was they really felt that putting no burden in the usage and creation of Teams helped them getting a very high percentage of Teams usage world wide. Users are really using the product and of course this has resulted in an enormous number of Teams. I questioned if they see this as a problem or not. Well they didn’t really feel it as a problem, but now see it’s a good time to get better lifecycle mechanisms in place, like automatically archiving Teams and using retention policies. One of the questions I got, is how they could get a good insight in the usage/activity of teams. This in order to be able to decide what actions to take on these teams.

FastTrack

The Microsof FastTrack team has started an Open Source initiative on Github with some really helpful scripts. The get-teamsusage PowerShell script gives a good insight into all your teams within your tenant. Under the hood it uses the Microsoft Graph Office 365 groups reports. I used the getOffice365GroupsActivityDetail report in the parameters of the script and this outputs a csv file with the following information:

  • Report Refresh Date
  • Group Display Name
  • Is Deleted
  • Owner Principal Name
  • Last Activity Date
  • Group Type
  • Member Count
  • External Member Count
  • Exchange Received Email Count
  • SharePoint Active File Count
  • Yammer Posted Message Count
  • Yammer Read Message Count
  • Yammer Liked Message Count
  • Exchange Mailbox Total Item Count
  • Exchange Mailbox Storage Used (Byte)
  • SharePoint Total File Count
  • SharePoint Site Storage Used (Byte)
  • Group Id
  • Report Period

With a sort on the Last Activity Date you get a pretty good insight in the Teams not used anymore or at least not for a long time. Also insight in how many files are stored (and active) in SharePoint can be a good way in your life cycle decisions.

.\TeamsUsageReport.ps1 `
    -TenantName "contoso.onmicrosoft.com" `
    -ClientID "afl724e4-5ac1-1b9c-be7c-917c95fq1w28" `
    -GroupsReport getOffice365GroupsActivityDetail `
    -Period D180 `
    -redirectUri "urn:foo"

Calling the PowerShell script

It is also possible to call the report through the Microsoft Graph directly:

https://graph.microsoft.com/beta/reports/getOffice365GroupsActivityDetail(period='D180')

Calling the report through the Microsoft Graph directly

When you call the Microsoft Graph directly, make sure to retrieve an Azure AD App token first and supply this as a bearer token in your call. The Azure AD App should have the Report.Read.All permission enabled.

Summary

Your tenant can become a big chaos when you enable self service Team creation. It also doesn’t restrict users in the usage of Microsoft Teams. Having control on the life cycle of your teams is a must in this case. The FastTrack Team has some good scripts in helping your organisation getting insight in the usage of your teams. With this information you could take action on those teams, which are not used for a long time. You could inform the current team owners, set policies on it, or at least determine if the team can be removed/archived or not. Get in control of the life cycle of the teams in your tenant! I hope this blog helps!