SOLVED

Unable to assign a Teams Phone number to a brand new user account (Error: we can't save changes)

%3CLINGO-SUB%20id%3D%22lingo-sub-3070818%22%20slang%3D%22en-US%22%3EUnable%20to%20assign%20a%20Teams%20Phone%20number%20to%20a%20brand%20new%20user%20account%20(Error%3A%20we%20can't%20save%20changes)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3070818%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20folks%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20facing%20an%20issue%20where%20I%20can't%20assign%20a%20Teams%20phone%20number%20(Canadian%20number%20issued%20by%20Microsoft)%20to%20a%20newly%20provisioned%20user%20via%20UI%20or%20PowerShell.%20The%20user%20was%20provisioned%20couple%20of%20days%20ago%20and%20the%20licenses%2Fuser%20location%20was%20perfectly%20set%20(as%20we%20normally%20do%20for%20every%20other%20request).%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELicenses%20-%20M365%20E5%2C%20M365%20Domestic%20and%20International%20calling%20plan.%3C%2FP%3E%3CP%3EUser%20Location%20-%20Canada%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EError%20from%20the%20UI%20(attached%20screenshot)%20-%20%22We%20can't%20save%20changes%20for%20the%20number%20right%20now.%20Try%20again%20later%22%3C%2FP%3E%3CP%3EPowerShell%20Errors%3C%2FP%3E%3CP%3EOutput%20from%20the%20old%20command%3A%20(Set-CsOnlineVoiceUser%20-Identity%20Email%20address%20removed%20-TelephoneNumber%20%2B16*********%3C%2FP%3E%3CP%3ESet-CsOnlineVoiceUser%20%3A%20Cmblet%20invocation%20error%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOutput%20from%20the%20latest%20command%3A%20(%20Set-CsPhoneNumberAssignment%20-Identity%20Email%20address%20removed%20-PhoneNumber%2016*********)%3C%2FP%3E%3CP%3EBad%20Request%20The%20User%20'*********'%20is%20not%20found%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EHere's%20what%20I've%20tried%20so%20far%20but%20none%20has%20worked%3A%3C%2FSTRONG%3E%3CBR%20%2F%3E1.%20Disable%20and%20re-enable%20the%20account%26nbsp%3B%3CBR%20%2F%3E2.%20Remove%20any%20numbers%20associated%20in%20the%20profile%20(there%20was%20a%20one%20under%20the%20mobile%20but%20that%20shouldn%E2%80%99t%20make%20any%20sense.%20Removed%20it%20anyways%20but%20no%20luck).%20No%20numbers%20allocated%20in%20the%20on-prem%20AD%20profile.%3CBR%20%2F%3E3.%20Remove%20and%20re-assign%20all%20licenses%3CBR%20%2F%3E4.%20Obtain%20a%20brand%20new%20number%20and%20try%20to%20assign%20that%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20insights%20would%20be%20really%20helpful.%20Thank%20you!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202022-01-25%20095410.jpg%22%20style%3D%22width%3A%20359px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F342087i3312FDD191C2DBF3%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202022-01-25%20095410.jpg%22%20alt%3D%22Screenshot%202022-01-25%20095410.jpg%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202022-01-25%20095537.jpg%22%20style%3D%22width%3A%20833px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F342088i574F884CA329DD63%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202022-01-25%20095537.jpg%22%20alt%3D%22Screenshot%202022-01-25%20095537.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3070818%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdministrator%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ECalling%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3088258%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20assign%20a%20Teams%20Phone%20number%20to%20a%20brand%20new%20user%20account%20(Error%3A%20we%20can't%20save%20changes)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3088258%22%20slang%3D%22en-US%22%3EUpdate%20---%3CBR%20%2F%3E%3CBR%20%2F%3EI%20also%20tried%20the%20following%20alternatives%20but%20none%20was%20effective.%20The%20issue%20remained%20intact%3CBR%20%2F%3E%3CBR%20%2F%3ETry%20to%20get%20rid%20of%20the%20stale%20entries%20in%20the%20Phone%20number%20field%20using%20the%20command%20below%3A%3CBR%20%2F%3ESet-CsPhoneNumberAssignment%20-Identity%20%22upngoeshere%22%20-PhoneNumber%20%22%22%3CBR%20%2F%3E%3CBR%20%2F%3EThen%20try%20to%20assign%20again%3CBR%20%2F%3ESet-CsPhoneNumberAssignment%20-Identity%20%22upngoeshere%22%20-PhoneNumber%20%22%2B16*********%22%3CBR%20%2F%3E%3CBR%20%2F%3EDisabled%20and%20enabled%20hostedvoicemail%20and%20enterprisevoice%20features%20for%20the%20user%20with%20no%20luck%20either%3CBR%20%2F%3E%3CBR%20%2F%3Eset-csuser%20-identity%20%22upngoeshere%22%20-hostedvoicemail%20%24false%20-enterprisevoiceenabled%20%24false%3CBR%20%2F%3Eset-csuser%20-identity%20%22upngoeshere%22%20-hostedvoicemail%20%24true%20-enterprisevoiceenabled%20%24true%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3088263%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20assign%20a%20Teams%20Phone%20number%20to%20a%20brand%20new%20user%20account%20(Error%3A%20we%20can't%20save%20changes)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3088263%22%20slang%3D%22en-US%22%3EUpdate%20----------%3CBR%20%2F%3E%3CBR%20%2F%3EApparently%20this%20had%20to%20be%20escalated%20to%20Microsoft%20support%20and%20then%20to%20the%20engineering%20team%20internally.%20After%202-3%20days%2C%20the%20number%20got%20assigned%20from%20the%20backend.%20The%20rootcause%20is%20still%20unknown%20and%20I%20am%20waiting%20to%20hear%20back.%3CBR%20%2F%3E%3CBR%20%2F%3EHope%20this%20will%20help%20someone%20out%20there%20one%20day.%3C%2FLINGO-BODY%3E
Contributor

Hi folks, 

 

I'm facing an issue where I can't assign a Teams phone number (Canadian number issued by Microsoft) to a newly provisioned user via UI or PowerShell. The user was provisioned couple of days ago and the licenses/user location was perfectly set (as we normally do for every other request). 

 

Licenses - M365 E5, M365 Domestic and International calling plan.

User Location - Canada 

 

Error from the UI (attached screenshot) - "We can't save changes for the number right now. Try again later"

PowerShell Errors

Output from the old command: (Set-CsOnlineVoiceUser -Identity Email address removed -TelephoneNumber +16*********

Set-CsOnlineVoiceUser : Cmblet invocation error

 

Output from the latest command: ( Set-CsPhoneNumberAssignment -Identity Email address removed -PhoneNumber 16*********)

Bad Request The User '*********' is not found

 

Here's what I've tried so far but none has worked:
1. Disable and re-enable the account 
2. Remove any numbers associated in the profile (there was a one under the mobile but that shouldn’t make any sense. Removed it anyways but no luck). No numbers allocated in the on-prem AD profile.
3. Remove and re-assign all licenses
4. Obtain a brand new number and try to assign that

 

Any insights would be really helpful. Thank you!

 

Screenshot 2022-01-25 095410.jpgScreenshot 2022-01-25 095537.jpg

4 Replies
Update ---

I also tried the following alternatives but none was effective. The issue remained intact

Try to get rid of the stale entries in the Phone number field using the command below:
Set-CsPhoneNumberAssignment -Identity "upngoeshere" -PhoneNumber ""

Then try to assign again
Set-CsPhoneNumberAssignment -Identity "upngoeshere" -PhoneNumber "+16*********"

Disabled and enabled hostedvoicemail and enterprisevoice features for the user with no luck either

set-csuser -identity "upngoeshere" -hostedvoicemail $false -enterprisevoiceenabled $false
set-csuser -identity "upngoeshere" -hostedvoicemail $true -enterprisevoiceenabled $true
best response confirmed by Manoj Karunarathne (Contributor)
Solution
Update ----------

Apparently this had to be escalated to Microsoft support and then to the engineering team internally. After 2-3 days, the number got assigned from the backend. The rootcause is still unknown and I am waiting to hear back.

Hope this will help someone out there one day.

@Manoj Karunarathne and anyone else interested - I had a very similar situation.  This with the most recent updates to the MicrosoftTeams PS Module.

 

Let me start with this:  We use Direct Routing

 

I have an existing user who simply moved to another geo-location and wanted her Teams phone number to reflect the local area.  Easy, right?  remove one and add a different one? Usually very simple.  

 

What I tried to assign was a number vacated by a terminated employee, but Teams PowerShell kept telling me the "number is already assigned to another user", yet if I filtered users in the Teams admin center by phone number, it was NOT in use by anyone else, and PowerShell kept telling me "invalid user account" 

 

What I ended up doing was not necessarily a good solution, but it did work.  I had to re-enable the terminated employee's AD account and allow it to sync. THEN I was able to remove the LineURI from the terminated user account, and assign it to its new owner.  

 

This has never been the case until now/latest Teams PS Module.  I frequently re-issue phone numbers from termed employees to new hires without any trouble at all.  I don't think enabling a terminated user's AD account is a very secure way to get things done...hopefully this gets fixed. 

 

Hope this helps anyone else having weird issues with Teams PS lately.

@Manoj Karunarathne I have a similar issue and even Microsoft Support were struggling with this one.

 

I think I’ve fixed it! Found a bigger hammer…though perhaps “older” is a better description.

After the Admin portal wasn’t working, I went back to PowerShell to delve deeper to gain some insights as to what might be going on.

 

First, I tried Set-CsPhoneNumberAssignment and the same “Bad Request, user not found”.

Then I decided to look at differences between working users and the one that does not work.

 

2 things jumped out.

 

Working:

OptionFlag                           : 131456

SipAddress                           : em***@*******.com.au 

SipProxyAddress                  : em***@******.com.au 

 

Not Working:

OptionFlag                           : 196864

SipAddress                           : al***@******.com.au 

SipProxyAddress                  : 1821529039******bfe68a0b190******cal***@******.com.au 

 

Using the Exchange Admin tool, I removed Al****’s SIP address, then added it again. This normalised the SIP address so both the SipAddress & SipProcyAddress matched.

 

It still did not work. I checked other users and they all had the same OptionFlag as Em*** (Working). I was stumped, but kept digging.

I stumbled across Adam Fowler’s post about the old PowerShell commands being deprecated and will be removed in April this year.
https://www.adamfowlerit.com/tag/microsoft-teams/

 

This gave me an idea…would the old commands work? Maybe they do things a little differently?

I gave it a go. Didn’t work to start with as I needed to find the correct Location Id….Get-CsOnlineLisLocation to the rescue.

 

Now with all the bits I needed, I ran Set-CsOnlineVoiceUser….

 

IT WORKED! No error. Quick check with Get-CsOnlineUser and yes the number is assigned. Checked the Teams Admin and it all looks like it stuck! Rang user, left a Voice Message on the new number. They just called back. =)

 

Leaving this here incase it helps someone else.