Tuesday, January 27, 2015

Configure Microsoft Dynamics Marketing Connector for CRM on-premises/IFD

To set up the MDM (Microsoft Dynamics Marketing) Connector with CRM on premise/IFD, you need to execute the following steps.
  1. Configure CRM to Expose CRM certificate.
  2. Install Marketing Connector for Microsoft Dynamics CRM.
  3. Configure ACS Name Space on Windows Azure.
  4. Add CRM certificate on Azure Service Bus.
  5. Configure MDM & Start Initial Synchronization.
Configure CRM to Expose CRM certificate:

If you are using a Microsoft CRM online environment, then this step is *not* needed, because CRM online exposes the certificate, as shown in the below screenshot.
image
After completing the below steps, CRM on-premises & IFD will expose the certificate.
The following items are pre-requisites for this.
  • A certificate from an issuing authority.
  • Logon access to a user account with the System Administrator role on the server.

Install the certificate in the certificate store of the server running the Microsoft Dynamics CRM asynchronous service.

Note: If the CRM application and Asynchronous service is installed on the same server, then you do not need follow the above step.

Generate a public key file in Base64 format from the certificate. To do this:
  • right-click on the certificate in the Personal/Certificates list
  • then under All Tasks in the context menu, select Export 

Provide read access to the certificate for the asynchronous service user:
  • Right click on the certificate and click on the All Tasks
  • then click on the Manage Private Keys, as shown in the below screenshot

image

Then provide the read permission to the user, that is running the Asynchronous service. As shown in the below screenshot.

image

In our case, we have given the read permission to the “CRM-AsynS” user, because our Asynchronous service is running under this user.

Configure MSCRM_Config database:

Add CRM Powershell Snap in.

Add-PSSnapin Microsoft.Crm.PowerShell

This command adds the CRM Windows PowerShell snap-in to the current session. The snap-in is registered during installation and setup of the CRM server.

Now you need to run the following command to Set the CRM certificate.

Set-CrmCertificate –CertificateType AppFabricIssuer –Name <issuerName> -StoreName My –StoreLocation LocalMachine -StoreFindType FindBySubjectDistinguishedName –DataFile <certificateFilename>

Issuer name <issuerName> can be any name. However, you will be using this same issuer name when configuring Microsoft Azure Active Directory Access Control Service (ACS). The DataFile parameter value is the file name or path of the public certificate key file.

After performing the above steps, the certificate will be visible your CRM IFD environment. As shown in the below screenshot.

image

Before, performing the above steps, it was displaying as follows.

image

Install Marketing Connector for Microsoft Dynamics CRM:

Download “Microsoft Dynamics Marketing CRM Connector” and install it.

After installation is complete, you will find the DynamicsMarketingConnectorSolution_managed.zip file in the installation path. As shown in the below screenshot.

Now in CRM, you will need to import the “DynamicsMarketingConnector_for_CRM2015_managed.zip” solution. As shown in the below screenshot.

image

And provide the “Dynamics Marketing Connector” security role to the user, you are setting up the connector with. As shown in the below screenshot.

image

Configure ACS Name Space on Windows Azure:

To configure the ACS Name space on Windows Azure, you need to first Add the Azure Account into your Power Shell. And for that you need to run the following command in Power Shell.

Add-AzureAccount

After running this command, it will display the login screen for Azure, as shown in the below screenshot.

image

Now you need to run the following command to create the ACS Name space in Azure.

New-AzureSBNamespace -Name YOUR_NAMESPACE -NamespaceType Messaging -Location "YOUR_LOCATION" -CreateACSNamespace 1

As shown in the below screenshot.

image

Then, it will create the Service Bus in Azure. As shown in the below screenshot.

image

Add the CRM certificate to the Azure Service Bus:

Now select your Service Bus and click on the “Connection Information” button on the Azure screen, then it will open the following screen.

image

Note: you need to copy the Default Key, this is the Management Key. This key will be used when configuring MDM.

Click on the “Open ACS Management Portal” option. This action will open the ACS Management Portal.

In the portal you will need to add the CRM certificate. This certificate must contain the public and private keys.

To add the certificate, go to the Certificates and Keys and click on the “Add Token Signing Certificate or Key” option, as shown in the below screenshot.

image

In the Add Token Signing Certificate or Key page, you need to import your certificate and provide the password of that certificate.

image

After the wizard completes, your certificate will be displayed as follows.

image

Configure MDM & Start Initial Synchronization:

To configure MDM connector, login to the Dynamics Marketing, and go to Settings and Integration Option. As shown in the below screenshot.

image

Now enable the CRM Connector Service, as shown in the below screenshot.

image

The action above will enable the services, as shown in the below screenshot.

image

Now configure the CRM End Points. To do this, you will need to give the CRM Service User information. This user will be used for integrating the MDM and CRM.

image

Now configure the Service Bus. To do this, you will need to provide the Azure Namespace, and ensure that you do not change the name of the Queue of CRM or MDM. As shown in the below screen.

image

Now click on “Configure Azure ACS” option. In the "Provide Credentials for configuring the Azure ServiceBus" page, set the following values.

Management Key, this is the Default key, which we have copied in the earlier steps, when we were adding the CRM certificate in the Azure Service Bus.

image

Dynamics CRM Service Certificate, you need to download the CRM certificate from the Developer Resources, screen, as shown below. And then you need to import that into the Dynamics CRM Service Certificate.

image

Now edit the SDK Service Settings, as shown in the below screen.

image

Then click on the “Configure Azure ACS” option. In the "Provide Credentials for configuring the Azure ServiceBus" page, paste the Management Key, which we copied during the adding CRM certificate in Azure Service Bus.

image

Now, it should start displaying that all the Services running, as shown below.

image

Now select appropriate options, and save the changes, as shown in the below screenshot.

image

After setup is complete, you can perform a Health Check and the Initial Synchronization. As shown in the below.

image

If you need to diagnose any issues with the MDM Connector, you can download the log from the Log section of the Marketing Integration page, as shown in the below screen.

image

And from the CRM Side, you can view the System Jobs. As shown in the below screenshot.

image

Hope this help you to configure the MDM integration with CRM!

3 comments:

  1. Very nice and detial document. It does help me a lot regarding how to configure data connector between CRM On Premise and Dynamics Marketing

    ReplyDelete
  2. We received an CRM (Online) certificate directly from Microsoft, because we had no idea how to create it in our On-Premise CRM. Can we use it (it seems to be valid, MDM Connector accepts it) or do we have to create our own one?

    More questions:
    Do wee need the IFD access on our On-Premise CRM system? I can't configure the CRM Endpoint in MDM successfully, maybe installing IFD could help?

    When I try to upload the certificate into Azure, a password is required. How can I get it?

    I hope, someone can answer these questions. We stuck on this integration for more than 3 weeks now.

    Best regards,

    Stephan

    ReplyDelete
  3. Hi Stephan,

    You need to purchase your own third party certificate for On-Premise CRM. Once you export the certificate from MMC, that time you need to set password. and that password you need to enter at the time of import the certificate on Bus Connector.

    Regards,
    Akhilesh - PNP

    ReplyDelete