Skip to main content

List app usage in Microsoft Teams

Inspired by: Thomy Goelles

A sample script which iterates through all the teams in your tenant and lists all apps in each team. This script will be handy if you want to generate a report of available apps in Teams across your tenant.

$availableTeams = m365 teams team list -o json | ConvertFrom-Json

if ($availableTeams.count -gt 15) {
$duration = [math]::Round(($availableTeams.count/60),1);
Write-Host "There are total of $($availableTeams.count) teams. This probably will take around $duration minutes to finish."
} else {
Write-Host "There are total of $($availableTeams.count) teams."
}

foreach ($team in $availableTeams) {
$apps = m365 teams team app list -i $team.Id
Write-Output "All apps in team are given below: $($team.displayName) $($team.id)"
Write-Output $apps
}
CTRL + M