Forum Discussion

David Steinberg's avatar
David Steinberg
Copper Contributor
May 23, 2018

Change Cloud Account Username

I created a cloud user and his username / email is test@domain.onmicrosoft.com

 

I need it to be test@mydomain.com.   I cant find the correct powershell command to do this.  Any help is appreciated.

7 Replies

  • The cmdlets you need is Set-MsolUserPrincipalName:

     

    Set-MsolUserPrincipalName -UserPrincipalName user@tenant.onmicrosoft.com -NewUserPrincipalName user@domain.com

    • David Steinberg's avatar
      David Steinberg
      Copper Contributor

      I can't get the command to work.   What do I need to install to get that?

      • Anonymous's avatar
        Anonymous
        You can run it on the machine that has azure ad sync on it, or you can download the latest azure ad powershell and do it from that from here: https://docs.microsoft.com/en-us/powershell/azure/active-directory/install-adv2?view=azureadps-2.0

Resources