Read time 5 minutes

Summary: Adding external contacts to Exchange Online involves creating a CSV file, using PowerShell to create contacts, and adding information. This manual process can be complex. Kernel Import PST to Office 365 offers a streamlined solution for bulk contact migration.

Organizations often find themselves needing to add numerous business contacts to the global address list of Exchange Online. One primary benefit of adding existing contacts to Exchange Online is the ease of access for users via the shared address book. Additionally, you can include external contacts as members of distribution groups. The process of importing external contacts to Exchange Online in bulk can be accomplished using Exchange Online PowerShell and a CSV file. Let’s delve into how this process works.

This process comprises three key steps, which involve creating a CSV file, creating external contacts using PowerShell, and subsequently adding information to the properties of these external contacts.

Creating a CSV File

The initial step involves the creation of a CSV file, which will contain all the relevant information about the external contacts you intend to migrate 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
    ExternalEmailAddress,Name,FirstName,LastName,StreetAddress,City,StateorProvince,
    PostalCode,Phone,MobilePhone,Pager,HomePhone,Company,Title,OtherTelephone,
    Department,CountryOrRegion,Fax,Initials,Notes,Office,Manager

    Note: The following text enumerates the properties of contacts that will be employed during the import process to Exchange Online. Once you have this list, you can proceed to input the specific details of your external contacts.

  2. You can open the CSV in Microsoft Excel as it will be easier for you to edit the CSV with MS Excel.
  3. Now, create a row for every external contact that you want to import to Exchange.
    Note: In the CSV file, it’s essential to populate the following properties: ExternalEmailAddress, Name, FirstName, and LastName. These properties are crucial because the PowerShell command will utilize the values specified in these fields to create the external 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..
    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.

  4. 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.
  5. 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.
  6. The imported contacts will be visible in the shared address book in Outlook and Outlook Web app..

Adding Information to the External Contacts

The previous step creates external contacts, but you will need to input the contact information from the cells in the CSV file. This is because, during the creation of external contacts, only the required properties are populated. If not all the information is populated in the contacts from the CSV, you will need to follow the steps below to complete the process.

  1. Connect to Exchange Online PowerShell from your Exchange Online administrator credentials.
  2. 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.Excel sheet with the information
  3. Now, run the below command in the PowerShell to add properties to the external contacts from the CSV file.
    $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}
  4. The process will take some time to update the contact information depending upon how many contacts you upload.
  5. You can verify whether the properties are added to the contacts or by visiting Recipients > Contacts in the EAC.
  6. 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 Outlook web app.

While following the aforementioned steps allows you to add new external contacts to Exchange Online, it’s worth noting that the manual process may not always work seamlessly, and users might encounter errors during the migration of external contacts to Exchange Online. Additionally, the process can appear lengthy and technical, making it less suitable for all users. Therefore, there’s a need for a solution that offers a seamless migration of contacts to Exchange Online.

Third Party Tool for Flawless Migration of Contacts to Exchange Online

Kernel Import PST to Office 365 is a powerful tool specifically tailored for migrating Exchange and Office 365 mailboxes from one server to another. It utilizes innovative algorithms that enable users to efficiently bulk import contacts into Exchange Online. In addition to contacts, users can also import mailboxes, calendars, tasks, and other items from CSV or PST files to Exchange Online and Exchange Server.

Final Words

We have explored the native method of moving external contacts to Office 365 using a CSV file, which can be a lengthy and challenging process. To simplify this task, a smart and professional tool for importing external contacts has been introduced. This tool proves to be valuable in various types of Office 365 migrations.

Kernel Import PST to Office 365