Microsoft Teams security

How to find teams with guests in Microsoft Teams

List teams with guest members with Microsoft Graph PowerShell, see the Guests column in the Teams admin centre, or use Altivane's Teams report for teams with guests and teams with no owner or 1 owner.

By the Published

To find teams with guests in Microsoft Teams, list the teams with Microsoft Graph PowerShell and read each team's summary, which counts its owners, members and guests. Keep the teams whose guest count is above 0. The count is of guest accounts in your directory, so people who join a shared channel from their own organisation are not in it.

Choose the method that fits the job
MethodBest fit
PowerShellA CSV of every team with guests, most guests first, with its owner and member counts.
Admin centreA quick look at the Guests column of the teams list, or at 1 team's members.
AltivaneRecommended for recurring guest reviews, beside the teams with no owner or 1 owner.

Before you start

Use an account with the Teams Administrator role, or Teams Reader to look without changing anything; Microsoft notes that Teams Reader currently needs a Teams licence to open the teams list in the admin centre. The PowerShell example requests TeamSettings.Read.All, which Microsoft lists for reading a team; your organisation may require administrator consent.

A guest here is a Microsoft Entra B2B guest who is a member of the team. The examples read team details and export them; they add or remove no one and change nothing.

Option 1

Find teams with guests with PowerShell

Install the modules once, then connect and export every team with at least 1 guest. It reads each team's summary in turn, so a tenant with many teams takes a while.

PowerShell
# Install once, if the modules are not already installed.
Install-Module Microsoft.Graph.Authentication, Microsoft.Graph.Teams -Scope CurrentUser
PowerShell
$ErrorActionPreference = 'Stop'
Connect-MgGraph -Scopes 'TeamSettings.Read.All' -NoWelcome
try {
    $teams = @(Get-MgTeam -All -Property 'id', 'displayName')
    $properties = 'id', 'displayName', 'visibility', 'isArchived', 'summary'
    $report = @(foreach ($item in $teams) {
        $team = Get-MgTeam -TeamId $item.Id -Property $properties
        $guests = [int]$team.Summary.GuestsCount
        if ($guests -gt 0) {
            [pscustomobject]@{
                Team = $team.DisplayName
                TeamId = $team.Id
                Visibility = $team.Visibility
                Archived = $team.IsArchived
                Owners = $team.Summary.OwnersCount
                Members = $team.Summary.MembersCount
                Guests = $guests
            }
        }
    })
    if ($report.Count -eq 0) {
        Write-Output "None of the $($teams.Count) teams has a guest."
    } else {
        $report | Sort-Object Guests -Descending |
            Export-Csv -Path './teams-with-guests.csv' -NoTypeInformation -Encoding utf8
        Write-Output "$($report.Count) of $($teams.Count) teams have guests."
    }
} finally {
    Disconnect-MgGraph | Out-Null
}

The CSV has 1 row for each team with guests, most guests first. Archived is True for a team kept read-only, which you may want to leave out of a review. To list every team with its counts, guests or not, remove the if around the row.

Option 2

Review team guests in the admin centre

  1. Sign in to the Microsoft Teams admin centre for the correct tenant.
  2. Go to Teams > Manage teams. The list shows every team in the organisation.
  3. Read the Guests column. If it is not shown, select the Edit columns icon, turn on Guests and select Apply.
  4. Select a team's name to open its profile page and read who its guests are.
  5. Leave each page without choosing Edit, Archive or adding and removing members, so nothing changes.

This suits a quick look, or checking 1 team. For a list to keep, sort and compare month to month, use PowerShell or a report.

Common questions

Why does a team's Team members count include its guests?

In the admin centre, Team members counts every user in the team: owners, members and guests. Guests counts only the Microsoft Entra B2B guests among them.

Are people in a shared channel counted as guests?

Not if they joined with their own organisation's account. Microsoft counts those people as external participants, not guests in your directory, so they are not in the guest count.

How do I list every guest account in the tenant?

A guest can be in several teams or in none. To list the guest accounts themselves, with when they last signed in, see how to list guest users in Microsoft Entra ID.

Microsoft references

Technical references checked on 6 November 2026. The example scripts have been reviewed and syntax checked; they have not been run against a live tenant.

Talk to us about Altivane

Questions, or pricing? Get in touch.

Contact us