Microsoft Teams – Cannot Assign Phone Number (User Hosted On-Premises Skype for Business)
Overview
When attempting to assign a phone number to a user in the Microsoft Teams Admin Center, you may encounter the following error:
“The user is hosted in an on-premises deployment of Skype for Business Server. This user's number must be changed in the on-premises environment and then synchronized to the cloud.”
This error indicates that the user still has legacy Skype for Business on-premises attributes, even if the Skype for Business Server environment has already been decommissioned.
Applies To
- Microsoft Teams Admin Center
- Skype for Business Server (legacy or decommissioned)
- Hybrid identity (Azure AD Connect) environments
- Teams Direct Routing / Operator Connect
Cause
This issue occurs when:
- The user was previously homed on on-prem Skype for Business Server
- Legacy attributes still exist in Active Directory, such as:
msRTCSIP-DeploymentLocatormsRTCSIP-LinemsRTCSIP-PrimaryUserAddress
- Teams interprets the user as still being on-prem hosted
- Number assignment in Teams is blocked by design
Resolution
Option 1 – Clear On-Prem Skype Attributes (Recommended when SfB is decommissioned) ✅
If the Skype for Business Server environment no longer exists, you must remove the legacy SfB attributes from Active Directory.
Steps
-
Open Active Directory PowerShell (with RSAT tools)
-
Run the following to clear Skype attributes:
-
PowerShell
Set-ADUser -Identity user@domain.com -Clear `
msRTCSIP-DeploymentLocator,
msRTCSIP-Line,
msRTCSIP-PrimaryUserAddress,
msRTCSIP-UserEnabled
- Force an Azure AD sync:
PowerShell
Start-ADSyncSyncCycle -PolicyType Delta
-
Wait for sync to complete (typically a few minutes)
-
Validate user is now cloud-managed:
PowerShell
Get-CsOnlineUser -Identity user@domain.com | Select HostingProvider
Expected result:
sipfed.online.lync.com
- Assign the phone number using:
- Teams Admin Center
- PowerShell
- CallTower Connect
✅ Use this option when:
- Skype for Business Server has been fully removed
- No hybrid voice configuration remains
- You want to fully manage users in Teams
Option 2 – Move User to Teams (Hybrid Still in Place)
If SfB hybrid still exists:
PowerShell
Move-CsUser -Identity user@domain.com -Target sipfed.online.lync.com
Then assign the number in Teams once the move is complete.
Option 3 – Modify Number On-Prem (If SfB Still Active)
If the on-prem SfB server is still in use:
PowerShell
Set-CsUser -Identity user@domain.com -LineURI "tel:+15551234567"
Allow time for Azure AD Connect sync.
Validation
After remediation, verify:
- User no longer shows the error banner in Teams Admin Center
- Phone number assignment succeeds
HostingProvider=sipfed.online.lync.com- Enterprise Voice can be enabled
Common Indicators of This Issue
- Red banner referencing on-premises deployment
- Phone number assignment fails in TAC
- User previously existed in SfB on-prem
- Migration completed, but cleanup not performed
- Skype attributes still present in AD
Additional Notes
- This is one of the most common post-migration cleanup issues
- Clearing attributes is safe once SfB is fully decommissioned
- Azure AD Connect must complete before changes take effect
- CallTower Connect and Teams Admin Center require the user to be cloud-homed
Summary
This issue occurs when legacy Skype for Business attributes remain in Active Directory.
👉 The most common fix (and recommended default) is to remove those attributes, sync to Azure AD, and then assign the number in Teams.
