question

ST-3307 avatar image
0 Votes"
ST-3307 asked ·

Renaming on-prem user that was renamed when syncing to Azure AD

We had a domain.onmicrosoft.com with a couple of users but one had name@domain.com as their user.

We then synced our on-prem server with Azure AD, so we had a local user which matched this by email. What it did was rename the on-prem user to user1234@domain.com only on the Azure side. We deleted the domain.onmicrosoft.com account so we could assign the original username/email to this account but it will not let us change it back.

There is no writeback to on-prem so locally its all okay.

If we go to edit online - the "User Principal Name" box is greyed out.

azure-active-directory
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

amanpreetsingh-msft avatar image
0 Votes"
amanpreetsingh-msft answered ·

Hi @ST-3307,

You cannot change UPN of synced users on Azure as the source of authority is Windows Server AD. To change UPN you have 2 options:

  1. Move the user to a non-sync OU, let it delete from Azure AD and move it back to sync OU.

  2. Use Set-MsolDirSyncEnabled -EnableDirsync $False cmdlet and then change the UPN. I would not recommend this in your case as you just want to change UPN of only one user and if you disable and re-enable Dirsync, it may take upto 72 hrs. So, choose to go with first option.


Please do not forget to "Accept the answer" wherever the information provided helps you. This will help others in the community as well.



· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I moved the user out and back in - both times waiting for the sync to apply each time (which takes a long time, even when manually running it through ADSync).

This is very reminiscent of "turn it off and on again".

0 Votes 0 ·