Bulk Import External Contacts To Exchange Online

Himanshu Goyal    Himanshu Goyal     Updated On - 30 Apr 2019

Organizations often have hundreds of business contacts that they want to add to the global address list of Exchange Online. One reason to add existing contacts to Exchange Online is that users will be able to access any of these contacts easily via the shared address book. Also, you can add external contacts as members of distribution groups. External contacts can be imported to Exchange Online in bulk using Exchange Online PowerShell and a CSV file. Let’s see how this process works.

This process consists of three steps, which include creating a CSV file, creating external contacts using PowerShell, and then adding information to the properties of external contacts.

Creating a CSV File

The first step involves creating a CSV file that will contain information about the external contacts that you want to move to Exchange Online.

  1. Copy and paste the below text to Notepad and enter the details of external contacts, and then save it with extension .csv; for example, Externalcontacts.csv
  2. ExternalEmailAddress,Name,FirstName,LastName,StreetAddress,City,StateorProvince,PostalCode,Phone,MobilePhone,Pager,HomePhone,Company,Title,OtherTelephone,Department,CountryOrRegion,Fax,Initials,Notes,Office,Manager

    Note: This text lists the properties of contacts that will be used while importing to Exchange Online. After adding this list, you can enter the details of your external contacts.

  3. You can open the CSV in Microsoft Excel as it will be easier for you to edit the CSV with MS Excel.
  4. Now, create a row for every external contact that you want to import to Exchange.
  5. Note: The following properties must be populated in the CSV file: ExternalEmailAddress, Name, FirstName, and LastName because the PowerShell command will use the values of these properties to create contacts.

Creating Contacts with PowerShell

After creating a CSV file, you can use Exchange PowerShell cmdlets to import external contacts to Exchange Online.

  1. Connect to Exchange Online PowerShell using Office 365 global administrator account.
  2. After connecting to PowerShell, navigate to the location where the CSV file is saved..
  3. Now, use the below command in PowerShell to create external contacts..
  4. Import-Csv .\ExternalContacts.csv|%{New-MailContact -Name $_.Name -DisplayName $_.Name -ExternalEmailAddress
    $_.ExternalEmailAddress -FirstName $_.FirstName -LastName $_.LastName}

    Note: Once the command is finished, PowerShell will display a list of new contacts that are created.

  5. You can view the new external contacts by visiting the Exchange Admin Center > Recipients > Contacts..
  6. If you’re unable to view the contacts, then click Refresh to update the list and check the contacts that are imported to Exchange Online.
  7. The imported contacts will be visible in the shared address book in Outlook and Outlook Web app..

Adding Information to the External Contacts

Performing the above step will create external contacts, but you’ll have to enter the contact information from the cells in the CSV file. It happens because while creating external contacts, only the required properties are occupied. So, if all the information is not populated in the contacts from CSV, then you’ll have to follow the below steps to do that.

  1. Connect to Exchange Online PowerShell from your Exchange.
  2. Go to the location where the CSV file is saved. For example, C:\users\administrator\desktop
  3. Now, use the below command to add properties to the external contacts from the CSV file.
  4. $Contacts = Import-CSV .\ExternalContacts.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}

  5. The process will take some time to update the contact information depending upon how many contacts you upload.
  6. You can verify whether the properties are added to the contacts or by visiting Recipients > Contacts in the EAC.
  7. To check any contact’s properties, click Edit on any contact.
  8. You can also check the contact’s properties in the address book of Outlook and Outlook web app.

    So, following the above steps, you can add new external contacts in Exchange Online. But sometimes the manual process doesn’t work properly, and users often get errors while migrating external contacts to Exchange Online. Therefore, they need a solution that provides flawless migration of contacts to Exchange Online.

Kernel Import PST to Office 365

Kernel Import PST to Office 365 is an effective tool specially designed to migrate Exchange and Office 365 mailboxes from one server to another. It is designed with innovative algorithms that allow users to bulk import contacts to Exchange Online quickly. Apart from contacts, users can also import mailboxes, calendar, tasks, and other items from a CSV or PST file to Exchange Online and Exchange Server.