Share via


Prepare a CSV File to Import New Exchange Online Users

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

You can use the Exchange Control Panel and a comma-separated value (CSV) file to create new mailboxes in your cloud-based domain. The CSV import file contains a row for each new user. Each row contains the information that the import process use to create a mailbox for the user.

This topic explains the following:

  • Creating the CSV import file
  • Required attributes
  • Optional attributes
  • Sample CSV import files

Creating the CSV import file

You can use any text editor, or an application like Microsoft Office Excel, to create the CSV file. Format the file as described later in this section and save the file as a .csv or .txt file.

The first row, or header row, of the CSV file lists the names of the attributes, or fields, specified in the rows that follow. Each attribute name is separated by a comma.

Each row under the header row represents one user and supplies the information that will be used to create that user. The attributes in each row must be in the same order as the attribute names in the header row. Each attribute value is separated by a comma.

To get a sample CSV file that you can use as a template to create your own CSV import file, click the sample CSV file link in the Import Users dialog box.

CSV file format

Here's an example of the format for a CSV import file, which contains the required attributes to create managed users. In this example, three new users are imported.

Name,EmailAddress,FirstName,LastName,Password
adamsta0109,terrya@contoso.edu,Terry,Adams,01091990
beebeab0211,annb@contoso.edu,Ann,Beebe,02111991
cannocc0328,chrisc@contoso.edu,Chris,Cannon,03281986

Columns in the CSV file

The same attribute in each row makes up a column. In the example, the columns names are the same as the attributes in the header row. The example has five columns: Name, EmailAddress, FirstName, LastName, and Password. The EmailAddress column, for example, includes the e-mail address for each new user: terrya@contoso.edu, annb@contoso.edu, and chrisc@contoso.edu.

Here’s the same CSV file shown in Excel.

Example of a CSV import file

File encoding

If the CSV file contains non-ASCII or special characters, save the CSV file with UTF-8 or other Unicode encoding. Depending on the application, saving the CSV file with UTF-8 or other Unicode encoding may be easier when the system locale of the computer matches the language used in the CSV file.

Top of page

Required attributes

This table describes the attributes required to import new users. The import process will fail if any one of these attributes isn't included in the header row of the CSV import file.

Note   Type the attributes exactly as they are shown. Attributes can't contain spaces. They must be a single word. For example, First Name is invalid. You must use FirstName.

Attribute

Description

Name

Name specifies an identifier for the user. The value for Name must be unique in your domain.

Important   The value of Name is used as the display name in the list of mailboxes in the Exchange Control Panel and in the shared address book if you don't include the DisplayName attribute, which is an optional attribute.

EmailAddress

EmailAddress specifies the e-mail address of a new user. It is also used to create the corresponding Windows Live ID. The value of EmailAddress must be unique in your domain.

FirstName

FirstName specifies the user's first name.

LastName

LastName specifies the user's last name.

Password

Password is the initial password assigned to a new Windows Live ID that is created for a mailbox user.

If you are a Live@edu organization, you can force users to change their password when they sign in to their account for the first time by using the ForceChangePassword attribute.

Note   The option to require users to change their password isn't available for Microsoft Office 365 e-mail organizations.

Top of page

Optional attributes

The import process supports and recognizes many additional attributes. This table describes the optional attributes that you can include in the CSV import file.

Attribute

Description

DisplayName

DisplayName specifies how the user name appears in the address book and in the list of mailboxes in the Exchange Control Panel. If you don't include DisplayName when you import new users or if you use a null value, the value of the Name attribute is used for DisplayName.

CustomAttributeN where N is an integer from 1 through 15.

Use CustomAttributeN attributes to store information about users, such as whether a user is a student, faculty member, or alumni, or to store an alternative e-mail address. The CustomAttributeN attributes aren't visible in the Exchange Control Panel or the shared address book. Use Windows PowerShell to view any CustomAttributeN attributes assigned to a user.

EvictLiveId

When set to 1, the EvictLiveId attribute uses an unmanaged Windows Live ID, which is specified in the EmailAddress column, for the new user. The unmanaged Windows Live ID is associated with the new mailbox and all of its existing settings, including the password or product points are preserved. However, the Windows Live ID is placed in a forced rename state. The user can sign in using the Windows Live ID and its password, but they're immediately asked to rename the Windows Live ID. They must specify an e-mail address that's outside your cloud-based domain. For more information, see Import or Evict Existing Windows Live IDs in Live@edu.

ForceChangePassword

Use the ForceChangePassword attribute to force new users to change their password after they log on for the first time. If you don't include the ForceChangePassword attribute, new users aren't required to change the password that you set in the CSV import file.

Note   Only Live@edu organizations can use this attribute. If you are a Microsoft Online e-mail organization, the import process will fail if you include this attribute in the CSV import file.

ImportLiveId

When set to 1, the ImportLiveId attribute uses an unmanaged Windows Live ID, which is specified in the EmailAddress column, for the new user. The Windows Live ID and all of its existing settings are preserved, and it is associated with a new mailbox created during the import process. For more information, see Import or Evict Existing Windows Live IDs in Live@edu.

MailboxPlan

A mailbox plan defines a common default configuration when you create new users. Use the MailboxPlan attribute to specify a mailbox plan for users. If you don't include the MailboxPlan attribute, the default mailbox plan for your organization is used.

To display a list of mailbox plans for your organization, use the following command: Get-MailboxPlan | FL DisplayName

For more information about mailbox plans, see Mailbox Plans.

City

City specifies the city that is listed for the user in the address book.

Company

Company specifies the company name that is listed for the user in the address book.

CountryorRegion

CountryorRegion specifies the name of the country or region that is listed for the user in the address book. To find the valid values for the CountryorRegion attribute, from your cloud-based e-mail, click Options > Account > Edit > Contact Location. In the drop-down menu for Country/Region, you'll find all the valid values.

Department

Department specifies the department that is listed for the user in the address book.

Fax

Fax specifies the fax number that is listed for the user in the address book.

HomePhone

HomePhone specifies the home phone number that is listed for the user in the address book.

Initials

Initials specifies the middle initial that is listed for the user in the address book.

MobilePhone

MobilePhone specifies the mobile phone number that is listed for the user in the address book.

Notes

The Notes field specifies additional information that is listed for the user in the address book.

Office

Office specifies the office location that is listed for the user in the address book.

Phone

Phone specifies the work phone number that is listed for the user in the address book.

PostalCode

PostalCode specifies the postal code that is listed for the user in the address book.

StateorProvince

StateorProvince specifies the state or province that is listed for the user in the address book.

StreetAddress

StreetAddress specifies the street address that is listed for the user in the address book.

Title

Title specifies the title that is listed for the user in address book.

WebPage

WebPage specifies the Web page address that is listed for the user in the address book.

Top of page

Sample CSV import file

Use this sample CSV file as a template to create your own CSV import file. Click Copy code and then paste the contents into an Excel file or text file.

CSV file for managed users

This sample CSV import file contains the required attributes to create managed users.

Name,EmailAddress,FirstName,LastName,Password
adamsta0109,terrya@contoso.edu,Terry,Adams,01091990
beebeab0211,annb@contoso.edu,Ann,Beebe,02111991
cannocc0328,chrisc@contoso.edu,Chris,Cannon,03281986
desaipd0430,prashanthd@contoso.edu,Prashanth,Desi,04301989
ersanee0529,ebrue@contoso.edu,Ebru,Ersan,05291988
flipffo0628,florencef@contoso.edu,Florence,Flipo,06281989
garciadg0726,debrag@contoso.edu,Debra,Garcia,07271986
halbeph0826,pernilleh@contoso.edu,Pernille,Halberg,08261986
ilyinji0925,julial@contoso.edu,Julia,Ilyina,09251985
johnstj1024,tamaraj@contoso.edu,Tamara,Johnston,10241987