Simplify user tasks like bulk creation, updates, password resets, deletions, license checks & more — all from one place.
🚀 Launch ToolkitManaging Microsoft Teams settings at scale can be cumbersome through the Teams Admin Center. This Graph PowerShell script allows administrators to quickly audit key team channel permissions across all Teams within a tenant — without having to click through each team manually.
# Get all groups that are provisioned as Teams
$teams = Get-MgGroup -Filter "resourceProvisioningOptions/Any(x:x eq 'Team')" -All
foreach ($team in $teams) {
$teamId = $team.Id
$teamDetails = Get-MgTeam -TeamId $teamId
Write-Host "Team Name: $($team.DisplayName)"
Write-Host "AllowCreateUpdateChannels: $($teamDetails.MemberSettings.AllowCreateUpdateChannels)"
Write-Host "AllowCreatePrivateChannels: $($teamDetails.MemberSettings.AllowCreatePrivateChannels)"
Write-Host "AllowDeleteChannels: $($teamDetails.MemberSettings.AllowDeleteChannels)"
Write-Host "`n"
}
Here are a few ways to expand the script:
Error | Cause | Solution |
Get-MgTeam : Cannot bind argument to parameter 'TeamId' because it is null. | One of the groups may not be a valid Team or is improperly provisioned. | Use try/catch to skip and log failed entries (already handled in the script). |
Missing required property 'memberSettings' | Rarely, some Teams may not return full settings. | These are often transient API issues. Consider retry logic or skip with warning. |
Access Denied or Unauthorized | Insufficient Graph API permissions. | Ensure the signed-in user has Team.Read.All or Group.Read.All delegated/admin consent. |
This script provides Microsoft 365 administrators with a quick, scalable way to audit Microsoft Teams channel-related permissions, especially the ability to create, update, and delete channels. Rather than visiting each Team through the admin portal, this Graph PowerShell-based approach saves hours of manual effort.
Using this script, admins can:
© m365corner.com. All Rights Reserved. Design by HTML Codex