Forum Discussion

Jerry Gonzalez's avatar
Jerry Gonzalez
Brass Contributor
Aug 14, 2018

Import contacts from parent company

We have a parent company with a separate Office 365 and Exchange Online. I have to import there contacts into our system. I see an option to export, but not to import.

 

The systems are not connected, two separate systems. So we are looking to import their contacts and I do an export of my contacts. We most likely want to do this every quarter.

 

 

 

 

  • Just to clarify, by "contacts" do you mean contact entries stored in the GAL, or stored in a specific mailbox? For the first scenario, you can use PowerShell to export/import them as needed, or use a specialized 3rd party tool (GalSync). For the second scenario, you will either have to export/import via Outlook, or by using EWS-based code.

      • VasilMichev's avatar
        VasilMichev
        MVP

        Yup, Get-MailContact should do the trick. It's relatively easy to automate this export via PowerShell, but as I mentioned above there are also specialized 3rd party tools for such scenarios, if you are willing to spend some $$.

  • Kohen Dubeau's avatar
    Kohen Dubeau
    Copper Contributor

    Jerry Gonzalez

     

    I recently ran into the similar scenario with a client.  If you have the export in a CSV file you can use PowerShell to create the mail objects, using the New-MailContact cmdlet.

     

    This is assuming you have column headers "DisplayName, PrimarySMTPAddress"

     

    You could use something like this:

     

    $csv = <Path to CSV>

    $import = Import-Csv $csv

    $import | Foreach {

    New-MailContact -Name $_.DisplayName -ExternalEmailAddress $_.PrimarySMTPAddress

    }

     

     

    • Brian Reid's avatar
      Brian Reid
      MVP
      And for contact sync, include an export of the legacyExchangeDN value at source and import it as an additional proxyAddresses attribute starting "X500:" (that is, add X500: to the legDN value when importing it)

Resources