Short answer
License the user for Teams Phone (plus a Calling Plan if Microsoft is your carrier), then assign the number in the Teams admin center under Users > Manage users > user > Account, or run Set-CsPhoneNumberAssignment with -PhoneNumberType CallingPlan, OperatorConnect or DirectRouting. In the US, a Calling Plan number needs an emergency location at assignment. Direct Routing users also need an online voice routing policy. Assigning a number turns on Enterprise Voice automatically.
Key facts
- Teams Phone needs the Microsoft 365 Phone System app: buy Microsoft Teams Phone Standard, or use a Microsoft 365 E5 license, which already includes it.
- A Calling Plan number can only be assigned to a user who also has a Calling Plan license, or a Teams Phone with Calling Plan bundle.
- In the United States and Canada, an emergency location is required when a Calling Plan number is assigned to a user.
- Set-CsPhoneNumberAssignment accepts DirectRouting, CallingPlan and OperatorConnect as number types and sets EnterpriseVoiceEnabled to True automatically.
- Teams admin center roles that can assign numbers: Teams Administrator, Teams Communications Administrator and Teams Telephony Administrator.
- Microsoft says it can take up to 24 hours for a user to be enabled after a number is assigned.
Prerequisites and licensing
Before you assign a number, get three things in place: the right admin role, the right licenses, and the number itself in your tenant (purchased, ported, provided by your operator, or available on your Session Border Controller for Direct Routing).
Teams Phone is the PBX layer (voicemail, transfer, auto attendants, call queues). The user needs licensing that includes the Microsoft 365 Phone System app: either Microsoft Teams Phone Standard on top of a qualifying plan (such as Microsoft 365 Business Basic, Standard or Premium, or E3), or a suite that already includes it, such as Microsoft 365 E5 (no Teams) with Teams Enterprise, or a legacy Microsoft 365 E5. External calling also needs a PSTN option. With Microsoft as carrier, buy Microsoft Teams Phone with Calling Plan, or add a Calling Plan (Domestic, International or Pay-As-You-Go) to Teams Phone Standard. Operator Connect, Teams Phone Mobile and Direct Routing need only the Teams Phone license from Microsoft; your carrier or SBC provider bills the PSTN service.
Make sure the user's usage location and the phone number are in the same country or region.
- Role: Teams Administrator, Teams Communications Administrator or Teams Telephony Administrator.
- Licenses are assigned in the Microsoft 365 admin center. In the Teams admin center, Users > Manage users shows a Calling Plan column so you can confirm a Calling Plan license.
- Hybrid tenants: if a number is stored in the msRTCSIP-Line attribute in on-premises Active Directory, clear it and let it sync before assigning a Calling Plan or Operator Connect number online.
- PowerShell: Windows PowerShell 5.1 or PowerShell 7.2 or later, with the MicrosoftTeams module.
| Requirement | Calling Plan | Operator Connect | Direct Routing |
|---|---|---|---|
| Teams Phone license | Yes (bundle or Teams Phone Standard) | Yes | Yes |
| Microsoft Calling Plan license | Yes | No | No |
| Emergency location on the number | Required at assignment in US and Canada | Depends on the operator | Optional on the number; emergency routing is configured with policies |
| Online voice routing policy | No | No | Yes |
Install and connect the MicrosoftTeams module
Install-Module -Name MicrosoftTeams -Force -AllowClobber
Connect-MicrosoftTeams
Step 1: Create a validated emergency address
Calling Plan users are automatically enabled for emergency calling and must have a registered emergency address tied to their number. In the US and Canada you pick that location at the moment you assign the number, so create it first. Microsoft recommends using the map search in the Teams admin center, which marks the address as validated and adds geo codes. Only validated addresses can be assigned.
For Operator Connect, whether you can set or change the emergency location depends on the capabilities your carrier gave the numbers. Check with your operator.
- Open the Teams admin center and go to Locations > Emergency addresses.
- Add the address using the map search so it is validated, and add places (floor, wing) if you need them.
- Open the address profile and copy the Location ID if you plan to assign numbers with PowerShell.
Step 2: Assign the number in the Teams admin center
There are two methods. Both work for all PSTN types, with one catch: the phone number list only shows Direct Routing numbers if you uploaded them to the tenant (Voice > Phone numbers > Add > From Direct Routing). From the user profile you can type a Direct Routing number by hand.
- Method A, from the user: Teams admin center > Users > Manage users, select the user, then open the Account tab.
- Select Assign primary phone number to open the Assign phone number side rail.
- In Phone number type, pick the PSTN option that owns the number (Calling Plan, Operator Connect or Direct Routing).
- In Assigned phone number, search for the number. For Direct Routing numbers you have not uploaded, type the number (and extension if used).
- Under Emergency location, search for and select the location you created.
- Leave Email user with telephone number information on (the default) or turn it off, then select Save.
- Method B, from the number: Teams admin center > Voice > Phone numbers, select an unassigned number, then select Edit.
- Under Assigned to, search for the user and select Assign, set the Emergency location, choose the email option, and select Save.
Step 3: Direct Routing extras
Direct Routing users need two more things before they can call the PSTN. First, an online voice routing policy that points to your PSTN usages and SBC routes. Microsoft notes that assigning the policy alone does not enable PSTN calls; the user still needs Teams Phone and an Enterprise Voice enabled number. Second, the user must be in Teams Only mode (the UpgradeToTeams instance of TeamsUpgradePolicy) so inbound calls land in Teams.
If the user was migrated from Skype for Business Server, confirm they are homed online: RegistrarPool should be in the infra.lync.com domain. If OnPremLineUri is populated, the number was set on-premises and must be cleared there and synced before you manage it online.
Assign numbers with PowerShell
Set-CsPhoneNumberAssignment is the current cmdlet for user and resource account numbers. -PhoneNumber and -PhoneNumberType are aliases of -TelephoneNumber and -NumberType, so either form works. Numbers can be E.164 (+12065551234) or non-E.164, but never prefixed with tel:. Direct Routing numbers can carry an extension, such as +14255551000;ext=1234. The -Notify switch emails the user about the new number (module 7.3.0 or later).
# Calling Plan number with a US emergency location
$loc = Get-CsOnlineLisLocation -City Seattle
Set-CsPhoneNumberAssignment -Identity [email protected] -PhoneNumber "+14255550101" -PhoneNumberType CallingPlan -LocationId $loc.LocationId
# Operator Connect number
Set-CsPhoneNumberAssignment -Identity [email protected] -PhoneNumber "+14255550102" -PhoneNumberType OperatorConnect
# Direct Routing number plus voice routing policy
Set-CsPhoneNumberAssignment -Identity [email protected] -PhoneNumber "+14255388797" -PhoneNumberType DirectRouting
Grant-CsOnlineVoiceRoutingPolicy -Identity [email protected] -PolicyName "RedmondOnlineVoiceRoutingPolicy"
# Look up, change or remove an assignment
# What number does this user have?
Get-CsPhoneNumberAssignment -AssignedPstnTargetId [email protected]
# Who holds this number, and is it blocked?
Get-CsPhoneNumberAssignment -TelephoneNumber +14255550101 | Select-Object TelephoneNumber,NumberType,PstnAssignmentStatus,AssignedPstnTargetId,AssignmentBlockedState
# Unassign one number (EnterpriseVoiceEnabled becomes False)
Remove-CsPhoneNumberAssignment -Identity [email protected] -PhoneNumber +14255550101 -PhoneNumberType CallingPlan
# Unassign every number from a user
Remove-CsPhoneNumberAssignment -Identity [email protected] -RemoveAll
Bulk assignment from a CSV
For more than a handful of users, loop over a CSV. Use -ErrorAction Stop inside Try/Catch so one bad row is logged instead of silently skipped. The CSV below has columns UPN, Number, Type (CallingPlan, OperatorConnect or DirectRouting) and LocationId (leave blank where not needed).
# Assign numbers from numbers.csv and log failures
Connect-MicrosoftTeams
$rows = Import-Csv -Path .\numbers.csv
foreach ($r in $rows) {
$params = @{
Identity = $r.UPN
PhoneNumber = $r.Number
PhoneNumberType = $r.Type
ErrorAction = 'Stop'
}
if ($r.LocationId) { $params.LocationId = $r.LocationId }
Try {
Set-CsPhoneNumberAssignment @params
Write-Host "OK $($r.UPN) $($r.Number)"
}
Catch {
Write-Host "FAILED $($r.UPN) $($r.Number): $($_.Exception.Message)"
}
}
Common errors and fixes
Microsoft documents these causes for numbers that will not assign or users who cannot dial out. For anything not covered, run the Teams Dial Pad Missing, Teams PSTN or Teams Direct Routing diagnostics from Help & Support in the Microsoft 365 admin center.
| Error or symptom | Cause | Fix |
|---|---|---|
| Set-CsPhoneNumberAssignment cannot set the number on a synced user | The number is set in on-premises Active Directory (msRTCSIP-Line) and synced to Microsoft 365 | Clear the number on-premises, let the change sync, then assign online |
| Calling Plan number will not assign | User has no Calling Plan license, or usage location and number country do not match | Assign a Calling Plan or Teams Phone with Calling Plan bundle; fix usage location |
| US or Canada Calling Plan assignment asks for a location | An emergency location is required at assignment in these countries | Create a validated address under Locations > Emergency addresses and pass -LocationId |
| Number already in use | PstnAssignmentStatus shows UserAssigned or another assigned state | Find the holder with Get-CsPhoneNumberAssignment -TelephoneNumber and run Remove-CsPhoneNumberAssignment on them |
| Unassigned number still cannot be assigned | AssignmentBlockedState is BlockedForever or BlockedUntil | Wait for the block to expire or run Remove-CsPhoneNumberAssignmentBlock |
| Cannot change emergency location on an Operator Connect number | The carrier controls location capabilities on its numbers | Ask your operator to update the location |
| Dial pad missing in Teams | No MCOEV license, user not homed online, EnterpriseVoiceEnabled False, or AllowPrivateCalling off in the calling policy | Fix the failing item, restart Teams, allow a few hours; check UserValidationErrors |
| User still not enabled after assignment | Latency between Microsoft 365 and Teams | Wait up to 24 hours, then use the Phone Number Service Center or open a support case |
| Direct Routing user has a dial pad but calls fail | No online voice routing policy, or user not in Teams Only mode | Grant-CsOnlineVoiceRoutingPolicy and assign the UpgradeToTeams policy |
How to verify it worked
- Teams admin center > Users > Manage users > user > Account: confirm the assigned phone number, the phone number type and the emergency location.
- Teams admin center > Voice > Phone numbers: confirm the number shows as assigned to the right user.
- Have the user restart Teams and open Calls. The dial pad should appear; place a test call out and a test call in.
- RegistrarPool should not be null and HostingProvider should start with sipfed.online.
- EnterpriseVoiceEnabled should be True. If a number is assigned and it is False, set it with Set-CsPhoneNumberAssignment -Identity $user -EnterpriseVoiceEnabled $true or the Enterprise Voice toggle in the Account tab.
- ActivationState should be Activated, not AssignmentPending or AssignmentFailed.
Check license, homing, Enterprise Voice and number
$user = "[email protected]"
# Teams Phone license: Capability starts with MCOEV and CapabilityStatus is Enabled
(Get-CsOnlineUser -Identity $user).AssignedPlan
# Homed online, voice enabled, number present, no provisioning errors
Get-CsOnlineUser -Identity $user | Select-Object RegistrarPool,HostingProvider,EnterpriseVoiceEnabled,LineUri,OnPremLineUri,UserValidationErrors
# Number record, type and location
Get-CsPhoneNumberAssignment -AssignedPstnTargetId $user | Select-Object TelephoneNumber,NumberType,ActivationState,LocationId
When to call a consultant
If you want numbers, emergency addresses and policies set up right the first time, book a short call and we will scope it with you.
Take the 2-min fit check Talk to a specialist
How Accred Consulting approaches it
Accred's US-based team handles number assignment as part of a Teams Phone rollout, not as a one-off. After a free call we scope the work as fixed fee or hourly and give you a written plan: license mapping, emergency addresses per site, number type per user, and policy assignments for Direct Routing. We pilot with a small group, test inbound, outbound and 933 calls, then assign the rest in bulk from a reviewed CSV with logged results. You get the final assignment list and the scripts we used so your team can run moves, adds and changes afterward.
Track record: 475+ client projects, 2,000+ migration workstreams and 210,000+ users migrated by a US-based team. Company facts · Case studies
Related questions
Sources
- Microsoft Learn: Manage phone numbers for users
- Microsoft Learn: Set-CsPhoneNumberAssignment
- Microsoft Learn: Teams Phone licensing
- Microsoft Learn: Teams dial pad access
Want this scoped for your environment?
Book a free consultation. After discovery you get a written plan with scope, pricing (fixed fee, hourly, retainer or block of hours) and a timeline.
Book a free consultation