Change a User's Primary E-mail Address

Applies to: Office 365 for professionals and small businesses, Office 365 for enterprises, Live@edu

In the cloud-based service, user IDs are formatted like e-mail addresses. In Microsoft Live@edu, the user ID is a Windows Live ID.

A cloud-based user signs in to their mailbox using their user ID, and the user ID is also the user's e-mail address. There are occasions, however, when an administrator may want to change a user's e-mail address without affecting their user ID.

When would you want to do this? Suppose you manage the cloud-based organization for a large university that uses student identification numbers for the user ID, such as 1234567@contoso.edu, but <first name>.<last name> for the e-mail address, such as kim.akers@contoso.edu. The user Kim Akers receives mail sent to 1234567@contoso.edu and kim.akers@contoso.edu, but kim.akers@contoso.edu is the primary "reply to" e-mail address on all messages sent from the mailbox.

You have to use Windows PowerShell to set the primary e-mail address. The user's primary e-mail address appears in the E-Mail Options section of the user's mailbox in the Exchange Control Panel, but you can't modify it there.

Note   To change the user ID and primary e-mail address to the same value at the same time, see Rename a User ID.

Before you begin

  • To learn how to install and configure Windows PowerShell and connect to the service, see Use Windows PowerShell in Exchange Online.
  • Make sure that the primary e-mail address is in an accepted domain that is configured for the cloud-based organization. For more information, see Accepted Domains.
  • Make sure to specify all the existing proxy addresses on the mailbox that you want to keep. When you perform the procedures in this topic, the e-mail addresses that you specify replace all existing proxy addresses on the mailbox. For more information, see Proxy Addresses.

Change the primary e-mail address of an existing user

Run the following command:

Set-Mailbox <Identity> -EmailAddresses SMTP:<new primary e-mail address>,<user ID>,<existing proxy address 1>,<existing proxy address 2>...

For example, suppose your cloud-based organization and all the user IDs are in contoso.com, and you have configured accepted domains and proxy addresses for all mailboxes in contoso.net and contoso.org. To change the primary e-mail address of a user named Kim Akers with the user ID kakers@contoso.com to kim.akers@contoso.com and to keep the existing proxy addresses on the mailbox, run the following command:

Set-Mailbox kakers@contoso.com -EmailAddresses SMTP:kim.akers@contoso.com,kakers@contoso.com,kakers@contoso.net, kakers@contoso.org

Note   You specify the primary e-mail address using the case-sensitive qualifier SMTP. If you don't specify SMTP, the first e-mail address becomes the primary e-mail address.

Change the primary e-mail address for many existing users by using a CSV file

To change the primary e-mail address of many existing users at one time, you need to create and import information about the existing users by using a CSV file. The following procedure imports data from C:\My Documents\ChangeAddress.csv. The CSV file has the following format:

UserID,NewAddress,Proxy1
akol@contoso.com,aylakol@contoso.com,akol@contoso.net
tjohnston@contoso.com,tamarajohnston@contoso.com,tjohnston@contoso.net

The column names in the first row of this CSV file (UserID,NewAddress,Proxy1) are arbitrary. Whatever you use for column names, make sure you use the same column names in the Windows PowerShell command.

After you create the CSV file with the existing user IDs, existing proxy e-mail addresses, and new primary e-mail addresses for the users you want to update, run the following commands:

$Users = Import-CSV "C:\My Documents\ChangeAddress.csv"
$Users | ForEach {Set-Mailbox $_.UserID -EmailAddresses $_.NewAddress,$_.UserID,$_.Proxy1}

Note   Because this procedure doesn't use the case-sensitive qualifier SMTP, the first e-mail address that is specified for the EmailAddresses parameter becomes the primary e-mail address.