Change Office 365 User’s Primary Email Address

Asset 18

Change Office 365 User’s Primary Email Address

Posted 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 “” -Credential $cred -Authentication Basic –AllowRedirection

2. You’ll need to type in your Office 365 tenant admin credentials in the login box.

Change Office 365 User’s Primary Email Address

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

Change *username* to the login ID of the user that is within AD and also replace 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
Asset 33

Communication is key

And connectivity is key for communication.

Beaming is an independent Internet Service Provider bringing connectivity joy to businesses across the UK.

Avoid internet downtime

IT professionals in UK businesses dealt with 82M hours of internet outages last year.

Get the best of Beaming straight to your inbox

Our monthly email bulletin updates you on the best tech dedicated to keeping you online, how to make the most of your current connectivity and business tips to free up more of your time.