Office 365 Groups are Connected to Lots of Resources
Update: Better methods now exist to find the set of team-enabled groups in a tenant.
One of the impressive things about Office 365 Groups is how quickly Microsoft development groups turned to Groups to use their simple membership model instead of creating their own application-specific implementation. The premier list of Office 365 applications that use Groups include Stream, SharePoint Online, Power BI, Planner, Yammer, and Teams.
All of which is great, but administrators sometimes want to know what resources a group is connected to, such as whether a group is connected to a team or Planner. The sad fact is that there’s no good way to make a simple PowerShell query to return this information.
Some people advocate looking at the ProvisioningOption property returned by the Get-UnifiedGroup cmdlet. This will tell you if Yammer created a group because the value of the property is then set to “YammerProvisioning.”
[Update – January 9, 2019: Microsoft has updated the Get-UnifiedGroup cmdlet to remove the ProvisioningOption property.]
The Many Values Created by Exchange
However, when an Exchange client (including the New-UnifiedGroup PowerShell cmdlet) creates a new Office 365 Group, you end up with some explainable values in the property. Here’s a selection of what I find in my own tenant:
Worse, you might find that the property doesn’t have a value. I accept that this might be the case for older groups (those created in 2016 or before), but even newly-created groups sometimes have a blank value for ProvisioningOption.
The profusion of different values or the lack of a value makes it hard to depend on the ProvisioningOption for anything, including listing Office 365 Groups that are team-enabled, which is probably the most frequent request when it comes to figuring out what resources belong to a group.
The Office 365 Groups marketing manager, Christophe Fiessinger, said in 2017 that “Using ExchangeProvisioningOption is NOT recommended since not all apps leverage it.” Not much has changed since and there’s no word from the engineering group that they might have done anything to improve the situation.
Use Get-Team to See Team-Enabled Groups
Since the original post was written, Microsoft has updated the PowerShell module for Teams. Running the latest version of the Get-Team cmdlet without any parameters returns the set of team-enabled groups in a tenant. This eliminates any need to jump through hoops to figure out a list of teams by checking the properties of groups, looking for team compliance records in the group mailbox, and so on.
Use the Graph Too
If you don’t want to limit yourself to PowerShell, the Microsoft Graph is the fastest method to fetch a set of Teams-enabled groups in a tenant. Here’s an example of using the Graph to fetch Teams. Remember that if you have more than 100 Teams in a tenant, you must use pagination to fetch the team information from the Graph. This post tells you how.
Lots has changed since the original post for this topic appeared in September 2018. Do yourself a favor and keep up to date with the latest in Office 365 by subscribing to the Office 365 for IT Pros eBook. All the information about using the Get-Team cmdlet is in Chapter 14.