Commands › Microsoft Teams

Grant-CsApplicationAccessPolicy

Microsoft Teams MicrosoftTeams Grant-*

Assigns a per-user application access policy to one or more users. After assigning an application access policy to a user, the applications configured in the policy will be authorized to access online meetings on behalf of that user.

Quick start script

# Grant-CsApplicationAccessPolicy — 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-CsApplicationAccessPolicy -Group <String> -Identity <UserIdParameter> | Format-List

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

Syntax — 3 parameter sets

Identity

Grant-CsApplicationAccessPolicy [-Identity <UserIdParameter>] [-PolicyName <String>] [-Global]

GrantToTenant (Default)

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

GrantToGroup

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

Parameters (9)

ParameterTypeRequiredWhat it controls
-Confirm SwitchParameter Prompts you for confirmation before running the cmdlet.
-Global SwitchParameter When you use this cmdlet without specifying a user identity, the policy applies to all users in your tenant, except any that have an explicit policy assignment. For example, if the user already have application...
-Group String yes Specifies the group used for the group policy assignment.
-Identity UserIdParameter yes Indicates the user (object) ID of the user account to be assigned the per-user application access policy.
-MsftInternalProcessingMode String For internal use only.
-PassThru SwitchParameter Allows the user to indicate whether the cmdlet passes an output object through the pipeline, in this case, after a process is stopped. Be aware that this parameter is tied to the cmdlet itself instead of to a...
-PolicyName PSListModifier Name of the policy to be assigned. The PolicyName is simply the policy Identity without the policy scope (the "tag:" prefix). For example, a policy with the Identity tag:ASimplePolicy has a PolicyName equal to ASimplePolicy.
-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.