Hi Norb,
Here are the steps:
- Sign into the portal as an admin, go to the admin center, click Active Users > select all users whose domains you need to change > Bulk actions > Edit domains, then select the domain you want to be the default one.
- You can also change them in bulk by PowerShell
a. Install the Azure AD Module by referring to install the Azure AD Module.
b. In PowerShell, connect to Azure AD by running Connect-msolservice, then type in your credentials.
c. Export your existing users in a .csv file by running Get-MsolUser | Select-Object UserPrincipalName | Export-Csv c:\Users.csv.
A .csv file will be created in disk C including only one column: UserPrincipalName.
d. Complete the file with another column: EmailAddress. EmailAddress should be the address you want to use.
e. Create a ps1 script as below:
$Userstodatabase = import-csv c:\Users.csv
foreach ($Record in $Userstodatabase)
{
$upn = $record.userprincipalname
$email = $record.emailaddress
Write-host Setting $upn to $email
Set-MSOLUserPrincipalName -UserPrincipalName $upn -NewUserPrincipalName $email
Write-Host ".."
}
f. Run the script by PowerShell.
Regards,
Linda