Commands › Microsoft Teams

Set-CsCallingLineIdentity

Microsoft Teams MicrosoftTeams Set-*

Modify a Caller ID policy in your organization.

Quick start script

# Set-CsCallingLineIdentity — 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-CsCallingLineIdentity
$before | Format-List

# 3. Make the change (dry run first)
Set-CsCallingLineIdentity  -WhatIf
Set-CsCallingLineIdentity

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

Syntax

Set-CsCallingLineIdentity [[-Identity] <string>] [-BlockIncomingPstnCallerID <boolean>] [-CallingIDSubstitute <string>] [-CompanyName <string>]
[-Description <string>] [-EnableUserOverride <boolean>] [-ResourceAccount <string>] [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters (9)

ParameterTypeRequiredWhat it controls
-BlockIncomingPstnCallerID Boolean The BlockIncomingPstnCallerID switch determines whether to block the incoming Caller ID. The default value is false.
-CallingIDSubstitute CallingIDSubstituteType The CallingIDSubstitute parameter lets you specify an alternate Caller ID. The possible values are Anonymous, LineUri and Resource.
-CompanyName String This parameter sets the Calling party name (typically referred to as CNAM) on the outgoing PSTN call.
-Confirm SwitchParameter The Confirm switch causes the command to pause processing, and requires confirmation to proceed.
-Description String The Description parameter briefly describes the Caller ID policy.
-EnableUserOverride Boolean The EnableUserOverride parameter gives Microsoft Teams users the option under Settings and Calls to hide their phone number when making outgoing calls. The CallerID will be Anonymous.
-Identity String The Identity parameter identifies the Caller ID policy.
-ResourceAccount Guid This parameter specifies the ObjectId of a resource account/online application instance used for Teams Auto Attendant or Call Queue. The outgoing PSTN call will use the phone number defined on the resource account as...
-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.