/commands/teams/grant-csteamsmeetingpolicy
Grant-CsTeamsMeetingPolicy: assign a Teams policy to a user, a group, many users or the whole tenant
- tool
- Microsoft Teams PowerShell
- versions
- MicrosoftTeams 8.0.0
- os
- windows, linux, macos
Teams policies (meeting, messaging, calling, app setup, ...) are assigned with Grant-Cs<PolicyType> cmdlets. For a meeting policy, after Connect-MicrosoftTeams:
# One user
Grant-CsTeamsMeetingPolicy -Identity anna@contoso.com -PolicyName "Restricted Meetings"
# A group (for example a security group or distribution list), with a rank
Grant-CsTeamsMeetingPolicy -Group sales@contoso.com -PolicyName "Restricted Meetings" -Rank 1
# Org-wide default
Grant-CsTeamsMeetingPolicy -Global -PolicyName "Restricted Meetings"
# Back to the default: remove the direct assignment
Grant-CsTeamsMeetingPolicy -Identity anna@contoso.com -PolicyName $nullGrant-CsTeamsMeetingPolicy (like the other common Grant-Cs* cmdlets) has three parameter sets: user, group and global. The syntax in MicrosoftTeams 8.0.0, read offline:
Import-Module MicrosoftTeams
(Get-Command Grant-CsTeamsMeetingPolicy).ParameterSets |
ForEach-Object { '{0}: {1}' -f $_.Name, (($_.Parameters | Where-Object { $_.Name -in 'Identity','Group','Global','PolicyName','Rank' }).Name -join ', ') }Output
GrantToTenant: Global, PolicyName GrantToGroup: PolicyName, Group, Rank Identity: PolicyName, Identity
Which policy wins
A user has at most one effective policy per policy type. A policy assigned directly to the user wins over one inherited from a group; among groups, the assignment with the highest ranking wins (rank 1 is the highest); if neither exists the Global (org-wide default) policy applies. Check what a user ends up with:
Get-CsUserPolicyAssignment -Identity anna@contoso.com -PolicyType TeamsMeetingPolicyMany users at once
New-CsBatchPolicyAssignmentOperation assigns one policy to up to 5,000 users per batch (object IDs or SIP addresses) and runs in the background:
$users = Get-Content .\users.txt # one SIP address or object ID per line
New-CsBatchPolicyAssignmentOperation -PolicyType TeamsMeetingPolicy -PolicyName "Restricted Meetings" `
-Identity $users -OperationName "Restricted meetings for contractors"
Get-CsBatchPolicyAssignmentOperation # status of the batchesPass -PolicyName $null to remove the policy from the batch of users.
Group assignment with New-CsGroupPolicyAssignment
New-CsGroupPolicyAssignment -GroupId sales@contoso.com -PolicyType TeamsMeetingPolicy -PolicyName "Restricted Meetings" -Rank 1
Get-CsGroupPolicyAssignment -PolicyType TeamsMeetingPolicyThis is equivalent to Grant-CsTeamsMeetingPolicy -Group. Group assignments apply to members added later as well.
When to use which method
| Method | Best for |
|---|---|
| Grant-CsTeamsMeetingPolicy -Identity | One user or a short list in a loop; the assignment is direct and wins over group policies |
| Grant-CsTeamsMeetingPolicy -Group or New-CsGroupPolicyAssignment | Departments or roles that change over time; new group members get the policy automatically |
| New-CsBatchPolicyAssignmentOperation | Hundreds or thousands of users at once, for example after a migration |
| Grant-CsTeamsMeetingPolicy -Global | Changing what everyone without another assignment gets |
The same pattern for other policy types
Each Teams policy type has its own Grant-Cs cmdlet with the same user, group and global parameter sets. A few common ones, checked in MicrosoftTeams 8.0.0:
Import-Module MicrosoftTeams
'Grant-CsTeamsMessagingPolicy', 'Grant-CsTeamsCallingPolicy', 'Grant-CsTeamsAppSetupPolicy',
'Grant-CsTeamsAppPermissionPolicy', 'Grant-CsTeamsChannelsPolicy', 'Grant-CsTeamsUpgradePolicy' |
ForEach-Object { '{0}: {1}' -f $_, [bool](Get-Command $_ -ErrorAction SilentlyContinue) }Output
Grant-CsTeamsMessagingPolicy: True Grant-CsTeamsCallingPolicy: True Grant-CsTeamsAppSetupPolicy: True Grant-CsTeamsAppPermissionPolicy: True Grant-CsTeamsChannelsPolicy: True Grant-CsTeamsUpgradePolicy: True
The -PolicyType values of New-CsBatchPolicyAssignmentOperation and Get-CsUserPolicyAssignment use the type name without the Grant-Cs prefix, for example TeamsMessagingPolicy. Messaging policies are covered on Set-CsTeamsMessagingPolicy.
Pitfalls
- No connection. Without
Connect-MicrosoftTeamseveryGrant-Cscmdlet fails with Session is not established. - Direct assignment hides the group policy. If a user keeps the wrong settings after a group assignment, look for a direct assignment and remove it with
-PolicyName $null. - Changing the Global policy.
-Globalaffects every user without a direct or group assignment, so try the policy on a pilot group first.
FAQ
How do I find the exact policy names I can assign?
Run Get-CsTeamsMeetingPolicy | Select-Object Identity. Custom policies appear as Tag:Name; pass only the Name part to -PolicyName. Global is the org-wide default.
What role do I need to assign Teams policies?
Teams Administrator or Global Administrator in Microsoft Entra ID. Connect with Connect-MicrosoftTeams using that account before running any Grant-Cs cmdlet.
Why does the user still have the old meeting settings?
Assignments take time to reach the user and the Teams client. Check the assignment with Get-CsUserPolicyAssignment; if it shows the new policy, wait and have the user sign out and back in to Teams.
Sources
- learn.microsoft.comlearn.microsoft.com/en-us/powershell/module/microsoftteams/grant-csteamsmeetingpolicy
- learn.microsoft.comlearn.microsoft.com/en-us/powershell/module/microsoftteams/new-csbatchpolicyassignmentoperation
- learn.microsoft.comlearn.microsoft.com/en-us/powershell/module/microsoftteams/new-csgrouppolicyassignment
- learn.microsoft.comlearn.microsoft.com/en-us/microsoftteams/policy-assignment-overview