Commands › Microsoft Teams

Get-CsUserPolicyAssignment

Microsoft Teams MicrosoftTeams Get-*

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)

ParameterTypeRequiredWhat it controls
-Break SwitchParameter Wait for .NET debugger to attach
-HttpPipelineAppend SendAsyncStep[] SendAsync Pipeline Steps to be appended to the front of the pipeline
-HttpPipelinePrepend SendAsyncStep[] SendAsync Pipeline Steps to be prepended to the front of the pipeline
-Identity String yes The identify of the user whose policy assignments will be returned.
-InputObject IIc3AdminConfigRpPolicyIdentity yes Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
-PolicyType String Use to filter to a specific policy type.
-Proxy Uri The URI for the proxy server to use
-ProxyCredential PSCredential Credentials for a proxy server to use for the remote call
-ProxyUseDefaultCredentials SwitchParameter Use the default credentials for the proxy

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