๐Ÿ’ฌ Recipe ยท Microsoft Teams

List all Microsoft 365 Groups and Teams in the tenant

Inventory every Microsoft 365 Group and identify which ones are Teams-enabled

Complexity

Beginner

Impact

inventory + governance + reporting + read-only

Context

Why This Matters

Microsoft 365 Groups are the membership backbone for Teams, SharePoint sites, Planner, Outlook distribution, and Yammer communities. Over time, tenants accumulate hundreds or thousands of groups โ€” some created deliberately by admins, others auto-provisioned when users spin up a new Team or Planner board. Without periodic inventory, it becomes hard to answer basic governance questions: How many Teams do we have? Which groups are orphaned? Are there duplicates?

This recipe produces a complete inventory of every Microsoft 365 Group in your tenant and flags which ones are Teams-enabled (vs. Outlook-only groups or SharePoint-only groups). Run it as a starting point for lifecycle cleanup, license chargeback, security reviews, or migration planning.

Expected Outcomes

After completing this recipe, you will have:

  • A complete list of all Microsoft 365 Groups in the tenant, with display name, description, and group type
  • A clear distinction between Teams-enabled groups and other group types (Outlook, Security, Distribution)
  • Group IDs that can be fed into follow-up scripts (membership audits, archival, deletion)
  • An exportable CSV suitable for sharing with governance, security, or compliance stakeholders

Risks & Considerations

Things to watch for

  • Permissions: You need Group.Read.All (delegated or application). Without it, the Graph call returns HTTP 403.
  • Paging: Tenants with more than 100 groups will return an @odata.nextLink. You must follow it or you will miss groups. The sample script handles this automatically.
  • Throttling: Very large tenants (10k+ groups) may hit Graph throttling. Add retry-with-backoff or use $top=999 to reduce round trips.
  • Soft-deleted groups: This query does not return deleted groups. To include them, query /directory/deletedItems/microsoft.graph.group separately.
  • Privacy: Group names and descriptions can contain sensitive project codenames. Treat the export as confidential.

Required Permissions

PermissionWhy It's Needed
Group.Read.AllRequired to list all Microsoft 365 Groups and read their properties, including groupTypes and resourceProvisioningOptions which identifies Teams.
Directory.Read.AllAlternative broader permission that also grants read access to all directory objects including groups.

The fastest way to get this done โ€” just ask Dex. Copy the prompt below and paste it into your Dex conversation.

For IT Admins

Paste into Dex CoAdmin

List every Microsoft 365 Group and Team in our tenant. Include display name, description, group type, whether it is Teams-enabled, and the primary email. Export the result as CSV and give me counts by type.
Try in Dex CoAdmin