Read time: 8 minutes

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

What You Need Before You Import Contacts to Exchange Online?

Check the following permissions list before you start:

  • An account with recipient management privileges, such as Exchange Administrator or Recipient Administrator
  • Exchange Online PowerShell module installed
  • CSV file with correct headers
  • No duplicate email addresses in the CSV file

Methods to Bulk Import External Contacts to Exchange Online

Here are three different methods listed to import contacts to an Exchange Online account. You can choose any method as per your import requirements.

Method 1. Bulk Exchange Online Import Contacts Using PowerShell

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.

Step 1. 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 text below into Notepad, enter the details of external contacts, and then save it with the .csv extension; for example, Externalcontacts.csv. Keep the header on a single line.
  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.
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.

Step 2. 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 an account with the Exchange Administrator or Global Administrator role.
  2. Note: If you haven’t installed the Exchange Online PowerShell module, install it once with Install-Module ExchangeOnlineManagement, then connect with Connect-ExchangeOnline.
  3. After connecting to PowerShell, navigate to the location where the CSV file is saved.
  4. Now, use the command below in PowerShell to create external contacts.
  5. Import-Csv .\ExternalContacts.csv|%{New-MailContact -Name $_.Name -DisplayName $_.Name -ExternalEmailAddress $_.ExternalEmailAddress -FirstName $_.FirstName -LastName $_.LastName}
    Note: Run the command on one line, because a line break between a parameter and its value causes an error. Once the command is finished, PowerShell will display a list of new contacts that are created.
  6. You can view the new external contacts by visiting the Exchange Admin Center > Recipients > Contacts or by visiting the Microsoft 365 Admin Center >Users >Contacts.
  7. 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.

The imported contacts will be visible in the Global Address List in Outlook and the Outlook Web app. New contacts can take time to appear in Outlook, which uses a cached offline address book, so allow up to 24 hours.

Step 3. 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. This happens because, while creating external contacts, only the required properties are populated. . So, if not all the information is populated in the contacts from the CSV, then you’ll have to follow the steps below to do that.

  • Connect to Exchange Online PowerShell using your Exchange Online administrator credentials.
  • Go to the location where the CSV file is saved. For example, C:\users\administrator\desktop. The Excel sheet with the information looks like this.
  • Now, run the command below in PowerShell to add properties to the external contacts from the CSV file.
Import-Csv .\ExternalContacts.csv|%{Set-Contact -Identity $_.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}

The process will take some time to update the contact information depending upon how many contacts you upload.

  • You can verify whether the properties are added to the contacts by visiting Recipients > Contacts in the EAC.
  • To check any contact’s properties, click Edit on any contact.
  • You can also check the contact’s properties in the address book of Outlook and the 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. The usual causes are line breaks in the command, blank values, duplicate names, and invalid country codes. And, of course, the process seems long and technical, so it is not suitable for all users. Therefore, they need a solution that provides flawless migration of contacts to Exchange Online.

Method 2. Import Contacts to Exchange Online Via Exchange Admin Center

This method is best for small bulk imports of contacts in the new Exchange Admin Center. Moreover, it doesn’t require PowerShell. Follow the steps below to do it:

  1. Log in to the Exchange Admin Center and go to Recipient >Contacts.Go to Recipient then Contacts
  2. Click on the Add a mail contact button.Click on add a mail contact
  3. Enter First/Last Name (optional), Display name, Alias, and External email address, and click Next.Enter the contact details and click next
  4. Review the mail contact and create.
Note: EAC does not have a direct CSV import button for contacts. You have to add contacts one by one.

Method 3. Import Contacts Using Microsoft 365 Admin Center

External contacts you create in Microsoft 365 are mail contacts in Exchange Online, so they appear in the shared address book and Exchange Admin Center automatically. Here are the steps:

Note: Make sure you are a Global Administrator, Exchange Administrator, or Directory Writers’ member. Moreover, contacts should be in a CSV file, and contacts without an email address can’t be imported.
  1. Log in to the Microsoft 365 Admin Center.
  2. Go to Users >Contacts >Add multiple contacts. go to users then contacts and then add multiple contacts
  3. Click on the Browse button to select and upload the CSV file containing contacts.
  4. Note: You can only import 40 contacts per CSV file.
  5. Once the file is added, click the Add Contacts button.Click on add contacts button

Hide External Contacts From Shared Address Book

There are many organizations that use external contacts only so they can add them as a member of distribution groups. In such a case, companies might want to hide external contacts from the shared address book. Here are the steps to hide the contacts:

  1. Connect PowerShell to the Exchange Online organization.
  2. To hide a single contact, run the command below:
  3. Set-MailContact -HiddenFromAddressListsEnabled $true
  4. To hide all external contacts from the shared address book, run the command below:
Get-Contact -ResultSize unlimited -Filter {(RecipientTypeDetails -eq ‘MailContact’)} | Set-MailContact -HiddenFromAddressListsEnabled $true

Once you hide the contacts, they won’t appear in the shared address book, but you can see them as members of distribution groups.

Importing Contacts Stored in PST Files to Mailboxes

If your contacts are in a PST file, then Kernel Import PST to Office 365 can be used to import PST into Microsoft 365 mailboxes. This includes importing emails, contacts, calendars, and other mailbox items to Office 365 Primary, Archive, and Shared mailboxes as well as Public Folders and Office 365 Groups.

Final words

We learned the native way to move external contacts to Office 365 using a CSV file. The process is quite lengthy and technical. If contacts are in PST format, then a reliable tool to upload PST to Office 365 can be used. Such a solution can be valuable in other Office 365 migration scenarios too.

Frequently Asked Questions

Que. Can I bulk import contacts in Exchange Online from the Exchange Admin Center?

Ans. The new Exchange Admin Center does not have a direct bulk CSV import option for contacts. You can add contacts one by one from Recipients >Contacts.

Que. Do I need a license to create Mail Contacts in Exchange Online?

Ans. No, Mail contacts do not require a Microsoft 365 license. Only Mail Users and regular user mailboxes require a license.

Related Posts
Google Trust