Forum Discussion
David Steinberg
May 23, 2018Copper Contributor
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...
VasilMichev
May 23, 2018MVP
The cmdlets you need is Set-MsolUserPrincipalName:
Set-MsolUserPrincipalName -UserPrincipalName user@tenant.onmicrosoft.com -NewUserPrincipalName user@domain.com
David Steinberg
May 23, 2018Copper Contributor
I can't get the command to work. What do I need to install to get that?
- DeletedMay 23, 2018You 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
- VasilMichevMay 28, 2018MVP
Slight correction, that cmdlet requires the "old" MSOnline module: https://www.powershellgallery.com/packages/MSOnline
- DeletedMay 28, 2018ahh, thought the new one had the old command-lets on it too, you just had to use the other connect command?