Source record · tier 2 current vendor documentation
Set-CsPhoneNumberAssignment (MicrosoftTeams)
- Publisher
- Microsoft
- URL
- https://learn.microsoft.com/en-us/powershell/module/microsoftteams/set-csphonenumberassignment
- Published
- 2026-08-07
- Updated
- unknown
- Accessed
- 2026-09-25
- HTTP status
- 200
- License
- Microsoft Learn terms of use; no-redistribution; short excerpts and locators only
Source notes citing this source
- Assigning a phone number to a user with Set-CsPhoneNumberAssignment automatically sets EnterpriseVoiceEnabled to True. in context
- In PowerShell, Enterprise Voice is enabled without assigning a number by running Set-CsPhoneNumberAssignment -Identity <user> -EnterpriseVoiceEnabled $true. in context
- HostedVoiceMail no longer needs to be set for Teams users and isn't a parameter of Set-CsPhoneNumberAssignment, unlike the older Set-CsUser. in context
- Set-CsPhoneNumberAssignment -NumberType (alias PhoneNumberType) accepts DirectRouting, CallingPlan and OperatorConnect. Teams Phone Mobile numbers are assigned with OperatorConnect. in context
- If a user's phone number is set in on-premises Active Directory and synchronised to Microsoft 365, Set-CsPhoneNumberAssignment can't set the number until it is cleared on-premises and the change has synchronised. in context
- Set-CsPhoneNumberAssignment is available only in the commercial, GCC, GCCH and DoD cloud instances. in context
- Direct Routing numbers with extensions are assigned to a user or resource account in the form +1206555000;ext=1234 or 1206555000;ext=1234. in context
- Assigning a phone number automatically sets the EnterpriseVoiceEnabled attribute of the user or resource account to True. in context
- Removing the emergency location from a phone number, by passing the string null as LocationId, is supported only for Direct Routing numbers and for Operator Connect numbers that are not managed by the Service Desk. in context
- Set-CsPhoneNumberAssignment is available in Teams PowerShell module 3.0.0 or later; the Notify parameter arrived in 7.3.0 and alternate number assignment in 7.6.0. in context
- The TelephoneNumber parameter of Set-CsPhoneNumberAssignment accepts E.164 format (for example +12065551234) and the same digits without the plus sign, and the number cannot carry a 'tel:' prefix. in context
- The NumberType parameter of Set-CsPhoneNumberAssignment (alias PhoneNumberType) is mandatory for an assignment and supports exactly the values DirectRouting, CallingPlan and OperatorConnect. in context
- Set-CsPhoneNumberAssignment cannot set a phone number on a user or resource account whose phone number is set in on-premises Active Directory and synchronized into Microsoft 365; the number must first be cleared on-premises and that change allowed to sync. in context
- Assigning a phone number to a user or resource account automatically sets EnterpriseVoiceEnabled to True. in context
- Set-CsPhoneNumberAssignment requires Teams PowerShell module 3.0.0 or later (the Notify parameter 7.3.0 or later) and is available only in commercial, GCC, GCCH and DoD cloud instances. in context
- Set-CsPhoneNumberAssignment can set an emergency LocationId, obtained with Get-CsOnlineLisLocation, on both assigned and unassigned phone numbers. in context
- Removing a location from a number, by passing the string null as LocationId, is supported for Direct Routing numbers and for Operator Connect numbers that are not managed by the Service Desk. in context
- A number's emergency location can be removed (Set-CsPhoneNumberAssignment -LocationId 'null') for Direct Routing numbers and for Operator Connect numbers that are not managed by the Service Desk. in context
- The NumberType (alias PhoneNumberType) parameter of Set-CsPhoneNumberAssignment and Get-CsPhoneNumberAssignment accepts DirectRouting, CallingPlan and OperatorConnect. in context
- If a user or resource account has a phone number set in on-premises Active Directory and synchronised to Microsoft 365, Set-CsPhoneNumberAssignment cannot assign a number until that value is cleared on-premises and the change syncs. in context
- Assigning a phone number with Set-CsPhoneNumberAssignment automatically sets the user's or resource account's EnterpriseVoiceEnabled flag to True. in context
- No batch cmdlet for number-to-user assignment comparable to New-CsBatchPolicyAssignmentOperation appears in the reviewed sources; the documented bulk pattern for assignment is a per-number loop. inferred in context
- Microsoft's documented bulk pattern for number changes is a foreach loop over Get-CsPhoneNumberAssignment results that calls Set-CsPhoneNumberAssignment with -ErrorAction Stop inside Try/Catch for each number. in context
- Set-CsPhoneNumberAssignment -AssignmentCategory assigns a non-primary number: Private for an incoming-calls-only private line, or Alternate for an alternate line. in context
- Set-CsPhoneNumberAssignment is available only in the commercial, GCC, GCC High and DoD cloud instances. in context
- Direct Routing numbers with extensions, in the form +1206555000;ext=1234 or 1206555000;ext=1234, can be assigned with Set-CsPhoneNumberAssignment. in context
- To remove an emergency location from a phone number, pass the string 'null' to -LocationId; this is supported for Direct Routing numbers and for Operator Connect numbers not managed by the Service Desk. in context
- In the Assignment parameter set, the Set-CsPhoneNumberAssignment reference describes -NetworkSiteId as the ID of a network site that represents a physical venue such as an office, a set of buildings or a campus. disputed in context
- The second -NetworkSiteId entry in the Set-CsPhoneNumberAssignment reference, and the NetworkSiteId output in Get-CsPhoneNumberAssignment, say the parameter is reserved for internal Microsoft use. disputed in context
- Set-CsPhoneNumberAssignment -TelephoneNumber accepts E.164 (+12065551234) and non-E.164 (12065551234) formats but not a tel: prefix. in context
- In the Assignment parameter set of Set-CsPhoneNumberAssignment, -NumberType is mandatory and accepts DirectRouting, CallingPlan or OperatorConnect. in context
- Set-CsPhoneNumberAssignment cannot set a number on an account whose phone number is set in on-premises Active Directory and synced to Microsoft 365; the number must first be cleared on premises and the change allowed to sync. in context
- Set-CsPhoneNumberAssignment assigns a phone number to a user or resource account and automatically sets EnterpriseVoiceEnabled to True. in context
- Setting -ReverseNumberLookup SkipInternalVoip on a Direct Routing number makes internal calls to that number go out through external PSTN connectivity instead of internal VoIP via reverse number lookup. in context
- Set-CsPhoneNumberAssignment is available from module 3.0.0; the -Notify parameter was added in 7.3.0 and alternate number assignment in 7.6.0. in context
Cite this source record
APA
WarmTransfer. (2026, August 7). Set-CsPhoneNumberAssignment (MicrosoftTeams). WarmTransfer. https://warmtransfer.net/knowledge/sources/ms-ps-set-csphonenumberassignment
BibTeX
@misc{warmtransfer-ms-ps-set-csphonenumberassignment,
title = {Set-CsPhoneNumberAssignment (MicrosoftTeams)},
author = {{WarmTransfer}},
year = {2026},
url = {https://warmtransfer.net/knowledge/sources/ms-ps-set-csphonenumberassignment},
note = {Microsoft, accessed 2026-09-25}
}