Update / Modify Users Phone information on Exchange Online (PowerShell)

%3CLINGO-SUB%20id%3D%22lingo-sub-2339697%22%20slang%3D%22en-US%22%3EUpdate%20%2F%20Modify%20Users%20Phone%20information%20on%20Exchange%20Online%20(PowerShell)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2339697%22%20slang%3D%22en-US%22%3E%3CP%3EI%20was%20trying%20to%20update%20our%20company%20user%20phones%20through%20the%20Exchange%20Online%20Module%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fexchange%2Fset-user%3Fview%3Dexchange-ps%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3ESet-User%20cmdlet%3C%2FA%3E.%20Something%20easy%20like%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3ESet-User%26nbsp%3B-Identity%26nbsp%3B%24_.Identity%26nbsp%3B-Phone%26nbsp%3B%24_.BusinessPhone%26nbsp%3B%0ASet-User%26nbsp%3B-Identity%26nbsp%3B%24_.Identity%26nbsp%3B-MobilePhone%26nbsp%3B%24_.Mobile%26nbsp%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUntil%20not%20so%20long%20ago%2C%20it%20worked%20without%20issues%2C%20but%20recently%20we%20are%20getting%20the%20error%20below%2C%20impossible%20to%20get%20through%20it%20(other%20parameters%20update%20without%20issues).%3C%2FP%3E%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%3CEM%3EPhone%20and%20Mobile%20Phone%20for%20users%20with%20Recipient%20Type%20Details%20%22UserMailbox%22%20cannot%20be%20updated%20in%20Exchange%20Online%20for%20security%20reason.%20Please%20do%20it%20in%20Azure%20Active%20Directory.%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20only%20other%20entry%20I've%20found%20on%20Google%20is%20this%20one%2C%20but%20it%20seems%20unrelated%20to%20our%20issues%20since%20both%20tenants%20I'm%20working%20with%20are%20%22native%22%20AAD%2FO365%2C%20never%20had%20any%20connection%20with%20any%20AD.%3C%2FP%3E%3CUL%3E%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fanswers.microsoft.com%2Fen-us%2Fmsoffice%2Fforum%2Fmsoffice_o365admin-mso_exchon-mso_o365b%2Fcutover-migration-failure-due-to-users-phone-and%2Fe1e79f95-1afc-4a88-b061-f0eeb8881d65%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ECutover%20migration%20failure%20due%20to%20users%20phone%20and%20mobile%20number%20-%20Microsoft%20Community%3C%2FA%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3EAnyone%20knows%20a%20way%20around%20this%20%3F%3C%2FP%3E%3CP%3EOr%20do%20we%20now%20need%20to%20connect%20to%20the%20Azure%20modules%20to%20do%20it%20%3F%3C%2FP%3E%3CP%3EAlso%20wonder%20when%20did%20this%20change%20happen%2C%20and%20whether%20Microsoft%20documented%20it%20somewhere.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2339697%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExchange%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2341594%22%20slang%3D%22en-US%22%3ERe%3A%20Update%20%2F%20Modify%20Users%20Phone%20information%20on%20Exchange%20Online%20(PowerShell)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2341594%22%20slang%3D%22en-US%22%3EInteresting%2C%20let%20me%20try%20pinging%20few%20folks%20on%20this.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2343007%22%20slang%3D%22en-US%22%3ERe%3A%20Update%20%2F%20Modify%20Users%20Phone%20information%20on%20Exchange%20Online%20(PowerShell)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2343007%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F67895%22%20target%3D%22_blank%22%3E%40harveer%20singh%3C%2FA%3E%26nbsp%3BThanks%20for%20your%20input.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20know%20you%20can%20go%20through%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fazure%2Factive-directory%2Foverview%3Fview%3Dazureadps-1.0%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20ActiveDirectory%20(MSOnline)%3C%2FA%3E%20module%2C%20(or%20I%20guess%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fazure%2Factive-directory%2Foverview%3Fview%3Dazureadps-2.0%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Ethe%202.0%20version%3C%2FA%3E%20of%20it)%2C%20but%20that%20also%20requires%20new%20admin%20roles%20permissions%2C%20scripting%2C%20testing%2C%20etc.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20I'm%20trying%20to%20figure%20out%20is%3A%3C%2FP%3E%3COL%3E%3CLI%3EWhether%20there%20is%20a%20way%20around%20this%20limitation%20(make%20it%20work%20in%20Exchange)%3C%2FLI%3E%3CLI%3EWhether%20Microsoft%20has%20issued%20any%20notice%20for%20this%20change%20which%20is%20impacting%20our%20work-flows%20(out%20of%20curiosity%2C%20since%20I%20guess%20it%20won't%20help%20me%20much%20to%20know).%3C%2FLI%3E%3C%2FOL%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2341211%22%20slang%3D%22en-US%22%3ERe%3A%20Update%20%2F%20Modify%20Users%20Phone%20information%20on%20Exchange%20Online%20(PowerShell)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2341211%22%20slang%3D%22en-US%22%3E%3CP%3EHey%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F444410%22%20target%3D%22_blank%22%3E%40dgr4it%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20Sharing%20this%20is%20interesting%20!%3C%2FP%3E%3CP%3ESo%20it%20appears%20that%20MS%20has%20moved%20a%20few%20attributes%20from%20set-user%20to%20set-msoluser%2C%20like%20for%20example%20'phonenumber'%20and%20'mobilephone'%20i%20was%20able%20to%20change%20via%20Set-msoluser%20posting%20connecting%20to%20Msolservice%20(connect-msolservice).%20However%20'set-user'%20still%20works%20for%20other%20attributes%20which%20are%20not%20available%20in%20Set-Msoluser%2C%20for%20example%20-HomePhone%20and%20-OtherTelephone%20are%20still%20available%20to%20be%20updated%20via%20Set-User.%20It%20appears%20that%20-Phonenumber%20and%20-Mobilephone%20were%20conflicting%20atrributes%26nbsp%3B%20between%20set-user%20and%20set-msoluser%20and%20now%20they%20are%20available%20only%20with%20Msoluser.%3C%2FP%3E%3CP%3ESorry%20no%20documentation%20found.%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

I was trying to update our company user phones through the Exchange Online Module Set-User cmdlet. Something easy like:

 

Set-User -Identity $_.Identity -Phone $_.BusinessPhone 
Set-User -Identity $_.Identity -MobilePhone $_.Mobile 

 

 

Until not so long ago, it worked without issues, but recently we are getting the error below, impossible to get through it (other parameters update without issues).

Phone and Mobile Phone for users with Recipient Type Details "UserMailbox" cannot be updated in Exchange Online for security reason. Please do it in Azure Active Directory.

 

The only other entry I've found on Google is this one, but it seems unrelated to our issues since both tenants I'm working with are "native" AAD/O365, never had any connection with any AD.

Anyone knows a way around this ?

Or do we now need to connect to the Azure modules to do it ?

Also wonder when did this change happen, and whether Microsoft documented it somewhere.

4 Replies

Hey @dgr4it 

 

Thanks for Sharing this is interesting !

So it appears that MS has moved a few attributes from set-user to set-msoluser, like for example 'phonenumber' and 'mobilephone' i was able to change via Set-msoluser post connecting to Msolservice (connect-msolservice). However 'set-user' still works for other attributes which are not available in Set-Msoluser, for example -HomePhone and -OtherTelephone are still available to be updated via Set-User. It appears that -Phonenumber and -Mobilephone were conflicting atrributes  between set-user and set-msoluser and now they are available only with Msoluser.

Sorry no documentation found.

Thanks

Interesting, let me try pinging few folks on this.

@harveer singh Thanks for your input.

 

I know you can go through the Azure ActiveDirectory (MSOnline) module, (or I guess the 2.0 version of it), but that also requires new admin roles permissions, scripting, testing, etc.

 

What I'm trying to figure out is:

  1. Whether there is a way around this limitation (make it work in Exchange)
  2. Whether Microsoft has issued any notice for this change which is impacting our work-flows (out of curiosity, since I guess it won't help me much to know).

Hey @dgr4it 

AFIK Set-user is the only exchange command which would allow you to make the desired change, What is interesting though is I was able to update the phone number/mobile phone number via the new Exchange admin center https://admin.exchange.microsoft.com/ using an Exchange Admin account (worked for me; please test in your tenant). So theoretically it looks like the attributes are still available for update via exchange. May be for the time being you can use the new Exchange admin center to make the changes and get a ticket going with MS to confirm the changes around set-user. Lets see if Vasil can find something.

 

Thanks