Change Office 365 User’s Primary Email Address
Posted on 9 May 2018 by Anna MilchemNeed 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.
Import-PSSession $session
4. Now you’ll be able to run the command that’ll set the primary mailbox address
Set-Mailbox *username* -WindowsEmailAddress user@domain.com
Change *username* to the login ID of the user that is within AD and also replace user@domain.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.
Remove-PSSession $Session
Avoid internet downtime
IT professionals in UK businesses dealt with 60M hours of internet outages last year.