No one has responded to this discussion for at least a year, so this information may be out of date. If you're looking for information about this topic, please search for a more recent discussion or post a new question.

Changing Primary E-mail Address

This question is answered This question is answered

Hi All,

 

Can anybody let me know how to change the primary e-mail address on an account please? I've searched through each user and can add e-mail alias' but don't seem to be able to change to one of these as the primary e-mail.

 

Thanks a million in advance.

 

BigMik

Verified Answer
  • You can do it through PowerShell:

    $cred=Get-Credential

    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri ps.outlook.com/powershell -Credential $cred -Authentication Basic -AllowRedirection

    Import-PSSession $Session

    set-mailbox -identity user@domain.com -PrimarySMTPaddress newaddress@domain.com

    Remove-PSSession $Session

    That should get you what you need.

    Thanks,

    1 out of 2 people found this post helpful.

  • I just did this for my own email address,

    Login as an administrator  

    Useres --> Double Click on the user --> Settings

    Change the name in the username box  

    This changed my primary email address, AND it added an alias, or "other" email address.  

    You can check to be sure it did what you wanted by going to  More --> Change Mailbox Settings

    You should see the new address as the primary, and an alias for the original email address.

    Not sure if that's what you're looking to do, it stumped me long enough to find this post, go investigate power shell, and then poke around some more in the interface.   Maybe they just changed it, not sure.

All Replies
  • Can you tell me if you are adding users directly in Office 365 or using Active directory sync?  If you are using active directory you will need to change that from your local AD.  Even if you aren't running in a hybrid deployment scenario I have found the import looks at the email address on the general tab of the AD user to assign the default email address.  If the field is blank Exchange online will establish the [name]@[domain].onmicrosoft.com as the default email address.

    If the email address does not yet exist for the user you can assign it through Power Shell.  Search this forum for "change default email address with power shell" and you see the syntax to do it.

  • Hi CM,

    We're adding our users directly in Office 365. I want to change the primary e-mail for an existing user. Is that even possible?

    Thanks,

    BigMik

  • You can do it through PowerShell:

    $cred=Get-Credential

    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri ps.outlook.com/powershell -Credential $cred -Authentication Basic -AllowRedirection

    Import-PSSession $Session

    set-mailbox -identity user@domain.com -PrimarySMTPaddress newaddress@domain.com

    Remove-PSSession $Session

    That should get you what you need.

    Thanks,

    1 out of 2 people found this post helpful.

  • There is a technet article at technet.microsoft.com/.../dd251224 that explais the how to do this through powershell.  Unfortunately there is no way in Office365 portal to do it.  The old BPOS admin portal would allow you to this through the web portal but not the new Office365 interface.

    1 out of 1 people found this post helpful.

  • Hi BigMik,

    I want to check if your issue has been resolved.
    If you need further assistance, please feel free to reply to me.

    Thanks,
    Grace Shi

  • Hi,

    Unfortunately, my issue is not resolved. I tried the powershell commands above, and after figuring out a couple of issues with the syntax, finally got stuck. Each time I run set-mailbox -identity user@domain.com -PrimarySMTPaddress newaddress@domain.com, I receive this error:

     

    A positional parameter cannot be found that accepts argument '-PrimarySMTPaddre
    ss'.
        + CategoryInfo          : InvalidArgument: (:) [Set-Mailbox], ParameterBin
       dingException
        + FullyQualifiedErrorId : PositionalParameterNotFound,Set-Mailbox

     

    If someone could give me a hand, you'll be my hero for life.

     

    Thanks millions in advance.

     

    BigMik

     

  • I just did this for my own email address,

    Login as an administrator  

    Useres --> Double Click on the user --> Settings

    Change the name in the username box  

    This changed my primary email address, AND it added an alias, or "other" email address.  

    You can check to be sure it did what you wanted by going to  More --> Change Mailbox Settings

    You should see the new address as the primary, and an alias for the original email address.

    Not sure if that's what you're looking to do, it stumped me long enough to find this post, go investigate power shell, and then poke around some more in the interface.   Maybe they just changed it, not sure.

  • Thanks for all of your helpful posts, managed to play around witht the syntax and get this to work through PowerShell.

    Cheers,

    BigMik

  • ". . . the email address on the general tab of the AD user to assign the default email address.  If the field is blank Exchange online will establish the [name]@[domain].onmicrosoft.com as the default email address."

    This worked for me today.  I found a different link to the undocumented poweshell command that used different undocumented parameters, No success.

    Then I just simply added the correct primary email address, that didn't include that unwanted and unneeded 'onmicrosoft' , to the E-mail entry in the General tab for a new user, waited for synchronization, and now the user's primary email is  name@ourcompany.com and no longer name@ourcompany.onmicrosft.com.

  • Hi BigMik,

    Thanks for your update, and I’m glad to hear the shultis’s information is helpful.
    If you have any other questions when using Office 365, please feel free to post in the forum. We are more than happy to be of assistance.

     

    Hi shultis, and bsmith_ssg,

    Thanks for your information and sharing for this issue. Your time and efforts are highly appreciated.

    Thanks,
    Grace Shi

  • This works for me:

    $cred=Get-Credential

    $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri ps.outlook.com/powershell -Credential $cred -Authentication Basic –AllowRedirection

    Import-PSSession $Session

    set-mailbox -identity user@mail.com -WindowsEmailAddress  Usersnewmailadress@mail.com

    Remove-PSSession $Session

  • In this case we will change the default email address of an account without changing the username.

    Example: username@domainA.com has email address username@domainA.com

    After this change the username is still username@domainA.com but the default email address is username@domainB.com

    - Start PowerShell as Administrator

    - Run the following command:

    $LiveCred = Get-Credential (You get a login window, use your admin account of Office 365)

    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri ps.outlook.com/powershell -Credential $LiveCred -Authentication Basic -AllowRedirection

    Import-PSSession $Session

    set-mailbox -identity username@domainA.com -WindowsEmailAddress  username@domainB.com

    Remove-PSSession $Session

    When you recieve a error check the following in PowerShell:

    Get-ExecutionPolicy

    Set-ExecutionPolicy RemoteSigned

    net start winrm

    winrm get winrm/config/client/auth

    You see a list of authentication protocols. When Basic = false you need to run the following command:

    winrm set winrm/config/client/auth @{Basic="true"}

    net stop winrm

    net start winrm