Importing Bulk External Contacts in Exchange Online (Office 365)

Importing Bulk External Contacts in Exchange Online (Office 365)

One of the biggest problem for companies that has a huge external contact list in their existing email system is to migrate these contacts in Exchange Online.

To be honest, it is not hard as you thought. All you have to do is export them into a CSV file.

Here is a sample csv file

When your csv file is ready

First thing is to connect to Exchange online via WAAD PowerShell

Open the Windows Azure Active Directory PowerShell as Administrator

Set-ExecutionPolicy RemoteSigned

$LiveCred = Get-Credential

Note: The above command will open a login window. Enter an Office 365 administrator address and password.

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $LiveCred -Authentication Basic -AllowRedirection

Import-PSSession $Session

When the connection is established, go to the folder where your CSV file is

Import-Csv .\ExContacts.csv|%{New-MailContact -Name $_.Name -DisplayName $_.Name -ExternalEmailAddress $_.ExternalEmailAddress -FirstName $_.FirstName -LastName $_.LastName}

The users have been uploaded to your Office 365 Exchange. Once users are uploaded, you can still update the contact’s detail anytime you want

In order to do that, update the csv file with attribute names and then run the following commands

$Contacts = Import-CSV .\excontacts.csv

$contacts | ForEach {Set-Contact $_.Name -StreetAddress $_.StreetAddress -City $_.City -StateorProvince $_.StateorProvince -PostalCode $_.PostalCode -Phone $_.Phone -MobilePhone $_.MobilePhone -Pager $_.Pager -HomePhone $_.HomePhone -Company $_.Company -Title $_.Title -OtherTelephone $_.OtherTelephone -Department $_.Department -Fax $_.Fax -Initials $_.Initials -Notes $_.Notes -Office $_.Office -Manager $_.Manager}

If some of fields are empty, don’t worry, that fields will not be populated.


Stay Tuned!

Sonat Yaylali

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at

Up ↑

%d bloggers like this: