SOLVED

User lost phone number

Copper Contributor

We are 100% Microsoft teams, and we have no on-prem Skype for Business anymore since 2019. I have a user who suddenly lost the ability to receive and make phone calls. (Just one user). Looking into the user, I noticed that the configuration for teams was completely gone. I don't know how this happened, but that is besides the point: I need to fix this user.

So I tried this: (username and phone number changed to fake info)

 

PS C:\WINDOWS\system32> Set-CsPhoneNumberAssignment -Identity email address removed for privacy reasons -PhoneNumber "+15551234567" -PhoneNumberType DirectRouting

Which resulted in:

Microsoft.Teams.ConfigAPI.Cmdlets.internal\Set-CsPhoneNumberAssignment : 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.
At C:\Program Files\WindowsPowerShell\Modules\MicrosoftTeams\4.4.1\custom\PsExt\Merged_custom_PsExt.ps1:5935 char:9
+ Microsoft.Teams.ConfigAPI.Cmdlets.internal\Set-CsPhoneNumberA ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: ({ Identity = cf...iceEnabled = }:<>f__AnonymousType91`5) [Set-CsPhon
eNumberAssignment_Set], Exception
+ FullyQualifiedErrorId : BadRequest,Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Cmdlets.SetCsPhoneNumberAssignmen
t_Set

 

 

However, as said, no On-Prem Skype For Business servers exist. We ran Skype For Business on-prem from 2016-2019, but all servers were decommissioned at the end of 2019 when we fully migrated to Teams. Whats more, this particular user was not yet hired at that time, she was hired in 2020, AFTER the Skype For Business Servers were retired.

 

So I tried to move the user, just in case it got stuck somehow.....

 

C:\WINDOWS\system32> Move-CsUser -Identity email address removed for privacy reasons -Target sipfed.online.lync.com

 

Which gave me this:


Move-CsUser : The term 'Move-CsUser' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Move-CsUser -Identity email address removed for privacy reasons -Target sipfed.online.lync.co ...
+ ~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Move-CsUser:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

 

So yeah, that command has been retired. But I cannot find an equivalent command in the current Microsoft Teams Powershell to ensure this move is no longer on prem.

 

But, because it seems to think it is..... I tried to do what it suggested, and that is to configure the phone number locally, using this command:

 

 

PS C:\WINDOWS\system32> Set-CsUser -Identity "email address removed for privacy reasons" -LineURI tel:+15551234567 -EnterpriseVoiceEnabled $true

 

Which resulted in:


Set-CsUser : The user is not hosted online.
Parameter name: 96e4e3fb-c71a-434c-a7c4-7403d8d4e8c7
At line:1 char:1
+ Set-CsUser -Identity "email address removed for privacy reasons" -LineURI tel:+15551234567 -E ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: ({ UserId = cfed...onaryOfString }:<>f__AnonymousType95`2) [Set-CsUser
], Exception
+ FullyQualifiedErrorId : BadArgument,Microsoft.Teams.ConfigApi.Cmdlets.SetCsUser

 

 

So I am stuck....

 

In short:

 

User lost phone number.

Teams Powershell claims user is on-prem

We have not had a Skype for Business server since 2019

Can't set phone number online.

Can't set phone number on-prem.

 

And as such, I am stuck. I rather not delete/recreate the user, because that would really be the nuclear option......

 

Any ideas?

 

2 Replies

I haven't worked with any migrations but have you verified what's mentioned here as well? (note section) https://docs.microsoft.com/en-us/powershell/module/skype/move-csuser?view=skype-ps

 

Found this which might shed some light Move-CsUser is updated to enable moving users to Microsoft Teams after retirement of Skype for Busin...

best response confirmed by Therese_Solimeno (Moderator)
Solution

The most common causes I've seen for this error is that you had SfB at one point, and there are lingering AD attributes that were synced to Office365, so Teams thinks the account is in SfB.

Take a look at the object on-premises, the values you're looking for all start with msRTCSIP-*, so do this for your problem user:

Get-ADUser <identity> -Properties * | Select msRTCSIP*



The ones I've found cause the most issues are msRCTSIP-HomeServer, msRTCSIP-OptionsFlags, msRTCSIP-PoolAddress, and msRTCSIP-PrimaryHomeServer. If you really don't have SfB, and you didn't properly decommission it, you can use a PowerShell script to clear the attributes for the user and let them sync to Office365.

Set-ADUser <identity> -Clear @('msRTCSIP-HomeServer','......')


Just specify the fields you want to clear, and let the sync run.  If you're really not using SfB or any of the fields, you could do the same for all users and all fields, once you've validated.  In some customer environments, I leave the msRTCSIP-Line field alone and we let their provisioning software populate that field with their phone number which syncs to Teams, and provides the phone number automatically (with direct routing at least).

1 best response

Accepted Solutions
best response confirmed by Therese_Solimeno (Moderator)
Solution

The most common causes I've seen for this error is that you had SfB at one point, and there are lingering AD attributes that were synced to Office365, so Teams thinks the account is in SfB.

Take a look at the object on-premises, the values you're looking for all start with msRTCSIP-*, so do this for your problem user:

Get-ADUser <identity> -Properties * | Select msRTCSIP*



The ones I've found cause the most issues are msRCTSIP-HomeServer, msRTCSIP-OptionsFlags, msRTCSIP-PoolAddress, and msRTCSIP-PrimaryHomeServer. If you really don't have SfB, and you didn't properly decommission it, you can use a PowerShell script to clear the attributes for the user and let them sync to Office365.

Set-ADUser <identity> -Clear @('msRTCSIP-HomeServer','......')


Just specify the fields you want to clear, and let the sync run.  If you're really not using SfB or any of the fields, you could do the same for all users and all fields, once you've validated.  In some customer environments, I leave the msRTCSIP-Line field alone and we let their provisioning software populate that field with their phone number which syncs to Teams, and provides the phone number automatically (with direct routing at least).

View solution in original post