Commands › Microsoft Teams

Set-CsApplicationAccessPolicy

Microsoft Teams MicrosoftTeams Set-*

Modifies an existing application access policy.

Quick start script

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

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-CsApplicationAccessPolicy
$before | Format-List

# 3. Make the change (dry run first)
Set-CsApplicationAccessPolicy -Identity <XdsIdentity> -WhatIf
Set-CsApplicationAccessPolicy -Identity <XdsIdentity>

# 4. Verify and diff
$after = Get-CsApplicationAccessPolicy
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

Set-CsApplicationAccessPolicy [-AppIds <Object>] [-Description <String>] [[-Identity] <String>]
 [-MsftInternalProcessingMode <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters (6)

ParameterTypeRequiredWhat it controls
-AppIds PSListModifier A list of application (client) IDs. For details of application (client) ID, refer to: [Get tenant and app ID values for signing...
-Confirm SwitchParameter Prompts you for confirmation before running the cmdlet.
-Description String Free format text.
-Identity XdsIdentity yes Unique identifier assigned to the policy when it was created.
-MsftInternalProcessingMode String For internal use only.
-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.