Change Office 365 User’s Primary Email AddressPosted on 9 May 2018 by Anna Milchem
Need to change an Office 365 user’s primary email address? We’ll show you how.
If you want to change an Office 365 user’s primary email address when it’s synchronised with on premise Active Directory, you’ll need to have administrator access to PowerShell. You’ll also possibly need to enable signed scripts to be run in Powershell, if you haven’t already done so.
With these two requirements in place, you should run through the following steps.
1. Firstly you’ll need to connect to your Office 365 tenant’s Exchange Online PowerShell.
Run the following command
$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri “https://outlook.office365.com/powershell-liveid/” -Credential $cred -Authentication Basic –AllowRedirection
2. You’ll need to type in your Office 365 tenant admin credentials in the login box.
3. Next, run the following command which imports the remote PowerShell commands to your local session.
4. Now you’ll be able to run the command that’ll set the primary mailbox address
Set-Mailbox *username* -WindowsEmailAddress firstname.lastname@example.org
Change *username* to the login ID of the user that is within AD and also replace email@example.com to what you want the email address to be.
5. Once done you’ll need to run the following command to close the PS Session before closing your PowerShell window.
Avoid internet downtime
IT professionals in UK businesses dealt with 60M hours of internet outages last year.