Commands › Microsoft Teams

Grant-CsTeamsEventsPolicy

Microsoft Teams MicrosoftTeams Grant-*

Assigns Teams Events policy to a user, group of users, or the entire tenant. Note that this policy is currently still in preview.

Quick start script

# Grant-CsTeamsEventsPolicy — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-MicrosoftTeams -CertificateThumbprint $thumb -ApplicationId $appId -TenantId $tenantId

# 2. Run and inspect
Grant-CsTeamsEventsPolicy -Group <String> | Format-List

# 3. Export for evidence / drift tracking
Grant-CsTeamsEventsPolicy | Export-Clixml .\CsTeamsEventsPolicy-$(Get-Date -Format yyyyMMdd).xml

Syntax — 3 parameter sets

Identity (Default)

Grant-CsTeamsEventsPolicy [[-Identity] <String>] [-PassThru] [[-PolicyName] <String>]
 [-WhatIf] [-Confirm] [<CommonParameters>]

GrantToTenant

Grant-CsTeamsEventsPolicy [-PassThru] [[-PolicyName] <String>] [-Global] [-WhatIf] [-Confirm] [<CommonParameters>]

GrantToGroup

Grant-CsTeamsEventsPolicy [-PassThru] [[-PolicyName] <String>]
 [-Group] <String> [-Rank <Int32>] [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters (8)

ParameterTypeRequiredWhat it controls
-Confirm SwitchParameter Prompts you for confirmation before running the cmdlet.
-Global SwitchParameter Use this switch if you want to grant the specified policy to be the default policy for all users in the tenant.
-Group String yes Specifies the group used for the group policy assignment.
-Identity String Specifies the identity of the target user. Acceptable values include:
-PassThru SwitchParameter Enables passing a user object through the pipeline that represents the user being assigned the policy. By default, the Grant-CsTeamsEventsPolicy cmdlet does not pass objects through the pipeline.
-PolicyName String "Name" of the policy to be assigned. The PolicyName is simply the policy Identity minus the policy scope (the "tag:" prefix). For example, a policy with the Identity tag:DisablePublicWebinars has a PolicyName equal...
-Rank Int32 The rank of the policy assignment, relative to other group policy assignments for the same policy type.
-WhatIf SwitchParameter Shows what would happen if the cmdlet runs. The cmdlet is not run.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.