Commands › Microsoft Teams

Grant-CsCallingLineIdentity

Microsoft Teams MicrosoftTeams Grant-*

Apply a Caller ID policy to a user account, to a group of users, or to set the tenant Global instance.

Quick start script

# Grant-CsCallingLineIdentity — 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-CsCallingLineIdentity -Group <String> | Format-List

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

Syntax — 3 parameter sets

GrantToTenant (Default)

Grant-CsCallingLineIdentity [[-PolicyName] <string>] [-Global] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]

GrantToGroup

Grant-CsCallingLineIdentity [-Group] <string> [[-PolicyName] <string>] [-PassThru] [-Rank <int>] [-WhatIf] [-Confirm] [<CommonParameters>]

Identity

Grant-CsCallingLineIdentity [[-Identity] <string>] [[-PolicyName] <string>] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters (8)

ParameterTypeRequiredWhat it controls
-Confirm SwitchParameter The Confirm switch causes the command to pause processing and requires confirmation to proceed.
-Global SwitchParameter Sets the parameters of the Global policy instance to the values in the specified policy instance.
-Group String yes Specifies the group used for the group policy assignment.
-Identity String The Identity of the user to whom the policy is being assigned. User Identities can be specified using the user's SIP address, the user's user principal name (UPN), or the user's ObjectId/Identity.
-PassThru SwitchParameter Enables you to pass a user object through the pipeline that represents the user being assigned the policy. By default, the Grant-CsCallingLineIdentity cmdlet does not pass objects through the pipeline.
-PolicyName String The name (Identity) of the Caller ID policy to be assigned. To remove an existing user level policy assignment, specify PolicyName as $null.
-Rank Int32 The rank of the policy assignment, relative to other group policy assignments for the same policy type.
-WhatIf SwitchParameter The WhatIf switch causes the command to simulate its results. By using this switch, you can view what changes would occur without having to commit those changes.

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