How to change the UserPrincipalName (UPN) of a user from one federated domain to another…

Matt Ellis
Jul 27, 2018 · 1 min read

If you’re reading this then you’ve probably tried to change the UPN of a synced user from one federated domain to another, wondered why it’s not synced properly and then tried to do it manually and encountered this error:

Set-MsolUserPrincipalName : Unable to complete this action. Try again later.

The reason you’re getting this is because for some reason (the reason is unknown to me) you can’t change the UPN of a user directly from one federated domain to another. When I say federated domain, I mean the verified domains in your O365 portal which aren’t your initial domain.

To get around this you first need to change the UPN to your initial domain and then to the target verified domain. So, two commands to perform one action:

Adjust the three variables at the top of this short script and run it:

365 UC

Matt Ellis

Written by

Unified Communications Architect, Pompey fan, burger eater, coffee drinker...

365 UC

365 UC

Stories from the world of UC by a bunch of UC professionals…

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade