Giuliano De Luca | Blog | delucagiuliano.com

Collecting the complete list of teams in your Tenant is something that you need to do, monitor, keep track or apply some customization to the existing collection of Microsoft Teams. The reasons could be various, but the ability to have a summary is, in fact, an added value in terms of functionality.

Microsoft Graph API to the rescue

The robust set of Graph API provided by Microsoft is growing always more, in fact, it’s interesting to explore the beta version to see what is coming. Some time ago I had the requirement to collect the list of Office 365 groups that had teams. I opened immediately the documentations in beta version of Graph API and I discovered the following OData Query:

GET /groups?$filter=resourceProvisioningOptions/Any(x:x eq 'Team')

Check here to check the documentation

Microsoft has used this property resourceProvisioningOptions to mark a group with a team, unfortunately, this property is not present in old teams which will be not displayed in the result of the Graph API query. In any case, in the future this gap will be filled with the enhancement of this property also for the old teams created.

Photo by Perry Grone on Unsplash