Commands › Microsoft Teams
Get-CsUserPolicyAssignment
This cmdlet is used to return the policy assignments for a user, both directly assigned and inherited from a group.
Quick start script
# Get-CsUserPolicyAssignment — 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
Get-CsUserPolicyAssignment -Identity <String> -InputObject <IIc3AdminConfigRpPolicyIdentity> | Format-List
# 3. Export for evidence / drift tracking
Get-CsUserPolicyAssignment | Export-Clixml .\CsUserPolicyAssignment-$(Get-Date -Format yyyyMMdd).xml
Syntax — 2 parameter sets
Get (Default)
Get-CsUserPolicyAssignment -Identity <String> [-PolicyType <String>] [-Break]
[-HttpPipelineAppend <SendAsyncStep[]>] [-HttpPipelinePrepend <SendAsyncStep[]>] [-Proxy <Uri>]
[-ProxyCredential <PSCredential>] [-ProxyUseDefaultCredentials] [<CommonParameters>]
GetViaIdentity
Get-CsUserPolicyAssignment -InputObject <IIc3AdminConfigRpPolicyIdentity> [-PolicyType <String>] [-Break]
[-HttpPipelineAppend <SendAsyncStep[]>] [-HttpPipelinePrepend <SendAsyncStep[]>] [-Proxy <Uri>]
[-ProxyCredential <PSCredential>] [-ProxyUseDefaultCredentials] [<CommonParameters>]
Parameters (9)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.