2 Ways to Change The Primary Email in Hybrid Environment

Change The Primary Email in Hybrid Environment

Thakns for visiting! It means a lot. Why not by me a coffee?

These are the best ways to Change The Primary Email in Hybrid Environment for a user. This may happen when you move from an on Premise AD environment to a Hybrid one.

You look in admin.microsoft.com and the use has the wrong primary SMTP address but you can’t change it in the portal….

It is simple to change the Primary Email Address of an M365 user when your tenant is not being synced to your on-premises active directory, but if you are syncing to M365 with any of the following tools:

  • Windows Azure Active Directory Sync (DirSync)
  • Azure AD Sync (AADSync)
  • Azure Active Directory Connect

Then you will be unable to change any of email addresses associated with that account, and you will get the following error:

Change The Primary Email in Hybrid Environment

How to Change The Primary Email of an Active Directory – Microsoft 365 user using ADUC

  1. Open Active Directory Users and Computers
  2. Ensure you have “Advanced Features” enabled from the view menu:
Change The Primary Email in Hybrid Environment
  1. Double click on the user that you want to edit the email addresses for. (Note: You cannot search for the user. The attributes tab will not be available). You must manually search out the user.
  2. To do this, find the user and then look at this users “Object” Tab. It will show you exactly where the user is in AD.
  3. Go to the “Attribute Editor” tab.
  4. Go to the “proxyAddresses” attribute and click edit.
  5. Edit the email addresses as per your requirements. Note that the primary address (which is the address that the user will send emails from) is in uppercase “SMTP”.
Change The Primary Email in Hybrid Environment

How to change Change The Primary Email in Hybrid Environment using PowerShell

You can perform the same operation to Change The Primary Email in Hybrid Environmentusing Windows PowerShell, the basic syntax is like this:

Set-ADUser user -Add @{ProxyAddresses=”SMTP:[email protected]”}

The problem with running this command is that you may already have a primary SMTP address set and this will not stop you from adding another one. So first of all run:

get-aduser user -properties proxyaddresses | Select-Object Name,ProxyAddresses |fl

This will show you all the current proxy addresses for this user. If you want to remove an existing proxy address, you can use:

Set-ADUser user -Remove @{ProxyAddresses=”smtp:[email protected]”}

Items like Distribution Lists will work better. Now your user will have its primary SMTP Address set correctly in a hybrid environment!

Avatar photo

I am an IT professional with over twenty years experience in the field. I have supported thousands of users over the years. The organizations I have worked for range in size from one person to hundreds of people. I have performed support from Help Desk, Network / Cloud Administration, Network Support, Application Support, Implementation and Security.

Pin It on Pinterest