The Dynamics 365 CRM integration allows you to import Accounts and Contacts from your Dynamics 365 CRM instance. To get this up and running, you will need to register a new application in Azure.
To register a new application in Azure, browse to your Azure Active Directory page and select App Registrations > New Registration.
You should give your application a sensible name, for example, Halo Dynamics 365 CRM. You can also specify a redirect URI at this stage. As part of configuring this application you will need to add multiple redirect URI’s, so you don’t need to worry about this for now.
Now that you’ve registered your application, you need to configure it so that it has the relevant permissions required by the Halo integration. In your application, go to the API Permissions tab to get started. You should see your list of current permissions, along with options to manage these. Select the option to add a new permission, and choose Dynamics CRM from the options available.
Next, apply the following permission under "Delegated Permissions". Click "Add Permissions" and then click the "Grant admin consent for ..." text once the option becomes available.
The first step is to navigate to the Authentication tab within your app, where we can begin to add redirect URI’s for our application.
One redirect URI is required for the integration to work successfully. Using https://myorg.com as an example Web App URL, add the following redirect URI to your application:
Be sure to select save to make sure your changes have been saved.
Once you’ve added the redirect URI’s, the final step is to ensure that you have checked the option for Access Tokens:
This section details the configuration that must be carried out in Halo to make the Dynamcs 365 CRM integration work as desired.
To enable the Dynamics 365 CRM integration in Halo, go to Configuration > Integrations, and enable the module. Once the module has been enabled, click the menu icon for the module to begin configuring it.
The first required option is the Organisation URL. This value can be obtained by going to the Dynamics home page, and opening any of your organisation’s apps.
The second required option is the Azure domain. Your Azure administrator will know this value (example: test.onmicrosoft.com). The next two fields require information from our Azure application which was configured in the previous steps.
To get the Azure Application ID, open Azure and open your configured Azure Application. You can find the Application ID from the overview page:
From here, navigate to the Certificates and Secrets tab. Underneath the Client Secrets heading, register a new client secret. You can choose whichever expiry length you wish, but keep in mind that you will need to update this value in Halo once it expires and you generate a new secret. You must ensure you take note of this value, as it is not retrievable again after you leave this page.
Once you’ve obtained this value, populate the field in Halo, and you now have all of the required fields to retrieve a token.
In order to import from Dynamics 365 CRM, we must first retrieve an Access token. Once you’ve populated the 4 mandatory fields, press the “Get Access Token” button. You will be redirected to a Microsoft Login page. Upon successful authentication, you will be redirected back to Halo, and the token retrieved option will be set to true. The button will remain available should you wish to refresh your token for any reason.
To begin importing, you first need to choose a default client and site. A user will be created under this client/site in the following circumstances:
You do not import Customers and Sites from Dynamics 365 CRM.
You have not imported the users associated Account from Dynamics 365 CRM.
The user is not associated with an account in Dynamics 365 CRM.
Once you’re happy with your configuration, choose either the Import Customers and Sites, or Import Users options to begin importing. You will be shown a table displaying all of your data that is available for import. To start the import, simply ensure that more than one of the rows is selected, and press start. The import can be used to import new, or update old records.
As highlighted at the beginning of this guide, this integration does not support duplicate customer names in Dynamics 365 CRM. You must ensure that you have no duplicate account names in Dynamics 365 CRM before proceeding with the import.