Unable to add user to Office 365 or rename user because of existing username

microsoft-office-365

When changing a users username from @onmicrosoft.com to real domain you get the following error:
"We're sorry, the user couldn't be edited. Review the user information and try again. Correlation ID"

Or if creating a new user and you get the following error "A user with this name already exists. Use a different name."

But running the cmdlet as described in the following help article does not yield any results:

https://support.microsoft.com/en-us/help/2428507/you-receive-the-following-error-message-in-the-office-365-portal-a-user-with-this-name-already-exists.-use-a-different-name.

Best Answer

Probable cause:

There is a personal Microsoft account with the same email address, as the one you are trying to add, already present in the AD. This will NOT show up in the cmdlet output.

i.e. Adding mike@contoso.com (or changing the name from mike@contoso.onmicrosoft.com) will result in an error if Mike has already added his personal Microsoft account mike@contoso.com via the Azure Portal (this will show up in the list as mike_contoso.com#EXT#@contoso.onmicrosoft.com)

Solution:

  • Delete the personal Microsoft account
  • Create the company account with the correct email (or change the current to the correct one)
  • Re-add the personal Microsoft account (do you really need it there?)