ÃÛ¶¹ÊÓƵ

Connect Campaign and Microsoft Dynamics 365 connect-to-msdyn

In this page, you will learn how to connect Campaign Classic to Microsoft Dynamics CRM 365.

Possible deployment is via Web API (recommended). Refer to the section below to learn steps to set up the connection with Microsoft Dynamics.

Data synchronization is carried out via a dedicated workflow activity. Learn more.

Implementation steps microsoft-dynamics-implementation-steps

To connect Microsoft Dynamics 365 to work with ÃÛ¶¹ÊÓƵ Campaign via Web API, you need to apply the following steps:

In Microsoft Dynamics CRM:

  1. Get Microsoft Dynamics Client ID
  2. Generate Microsoft Dynamics Certificate key identifier and Key ID
  3. Configure permissions
  4. Create an App User
  5. Encode the private key

Learn more in this section

In Campaign Classic:

  1. Create a new external account
  2. Configure the external account with Microsoft Dynamics settings
  3. Use the configuration assistant to map tables and synchronize enumerations
  4. Create the synchronization workflow

Learn more in this section

CAUTION
When connecting ÃÛ¶¹ÊÓƵ Campaign with Microsoft Dynamics, you cannot:
  • Install plug-ins which can change the CRM’s behavior, and lead to compatibility issues with ÃÛ¶¹ÊÓƵ Campaign
  • Select multiple enumerations

Configure Microsoft Dynamics CRM config-crm-microsoft

To generate the access token and keys to setup the account, you need to login to using a Global administrator credentials. Then follow the steps outlined below.

Get Microsoft Dynamics Client ID get-client-id-microsoft

To get the Client ID, you need to register an App in Azure Active Directory. Client ID is the same as Application ID.

  1. Navigate to Azure Active Directory > App Registrations, and click New Application Registration.
  2. Give a unique name which can help identify an instance, such as adobecampaign<instance identifier>.
  3. Choose Application type as Web app / API.
  4. Use http://localhost for Sign-on URL.

Once you save, you get an Application ID which is the Client Identifier for Campaign.

Learn more in .

Generate Microsoft Dynamics Certificate key identifier and Key ID config-certificate-key-id

To get the Certificate key identifier (customKeyIdentifier) and the Key ID (keyId), follow the steps below:

  1. Navigate to Azure Active Directory > App Registrations and select the Application which was created earlier.

  2. Click on Certificates and Secret.

  3. Click on Upload certificate and then browse and upload your public certificate generated.

  4. To generate the certificate you can use openssl.

    For example:

    code language-none
    - openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout '<'private key name'>' -out '<'public certificate name'>
    
    note note
    NOTE
    You can change the number of days, here -days 365, in the code sample for a longer certificate validity period.
  5. You will then need to encode it in base64. To do so, you can use the help of a Base64 encoder or use the command line base64 -w0 private.key for Linux.

  6. Click on the Manifest link to get the Certificate key identifier (customKeyIdentifier) and the Key ID (keyId).

The Certificate key identifier (customKeyIdentifier) and the Key ID (keyId) will be needed later on to configure your Microsoft Dynamics CRM external account using the Certificate CRM O-Auth type.

Configure permissions config-permissions-microsoft

Step 1: Configure the Required Permissions for the app that was created.

  1. Navigate to Azure Active Directory > App Registrations and select the Application which was created earlier.

  2. Click Settings on the top left.

  3. On Required Permissions, click Add and Select an API > Dynamics CRM Online.

  4. Click Select, enable Access Dynamics 365 as organization users checkbox and click Select.

  5. Then, from your app, select the Manifest under the Manage menu.

  6. From the Manifest editor, set the allowPublicClient property from null to true and click Save.

Step 2: Grant admin consent

  1. Navigate to Azure Active Directory > Enterprise applications.

  2. Select the application to which you want to grant tenant-wide admin consent.

  3. From the left pane menu, select Permissions under Security.

  4. Click Grant admin consent.

For more information on this, refer to .

Create an App User create-app-user-microsoft

NOTE
This step is optional with Password credentials authentication.

The App user is the user that the application registered above will use. Any changes made to Microsoft Dynamics using the App registered above will be done via this user.

Step 1: Create a non-interactive user on azure active directory

  1. Click Azure Active Directory > Users and click New User.
  2. Give a proper name that you want use and the username should be an email format.
  3. Choose Dynamics 365 Administrator in the Directory Role.

Step 2: Assign a proper license to the created user

  1. From , click on Admin app.
  2. Go to Users > Active Users and click on the newly created user.
  3. Click on Edit product licenses and select the Dynamics 365 Customer Engagement Plan.
  4. Click Close.

Step 3: Create an application user on Dynamics CRM

  1. From , navigate to Settings > Security > Users.

  2. Click on drop down, select Application users and click New.

  3. Use the same username as the user created on active directory above

    note note
    NOTE
    Using the same name throws duplicate key error, so until we get a confirmation as whether this step is needed, use a different username and proceed.
  4. Assign the Application ID for the application you created earlier.

  5. Click on Manage Roles and choose the System administrator role to the user.

Configure Campaign configure-acc-for-microsoft

NOTE
Post the decommissioning of , the On-premise and Office 365 types of CRM deployments are no longer compatible with Campaign. ÃÛ¶¹ÊÓƵ Campaign now only supports Web API deployment for the CRM version Dynamic CRM 365. Learn more.

To connect Microsoft Dynamics 365 and Campaign, you need to create and configure a dedicated External Account in Campaign.

  1. Navigate to Administration > Platform > External accounts.

  2. Select the Microsoft Dynamics CRM external account. Check the Enabled option.

  3. Fill in the information required to connect Microsoft Dynamics 365 and Campaign.

    note note
    NOTE
    Microsoft Dynamics CRM External account configuration with each CRM O-Auth type is detailed in this section.

  4. Click the Microsoft CRM configuration assistant… link. ÃÛ¶¹ÊÓƵ Campaign automatically detects the tables from the Microsoft Dynamics data template.

  5. Select the tables to be recovered.

  6. Click Next to start creating the corresponding schema.

    note note
    NOTE
    To approve the configuration, you must disconnect/reconnect to the ÃÛ¶¹ÊÓƵ Campaign console.

    You can check that the matching data schema becomes available in ÃÛ¶¹ÊÓƵ Campaign.

  7. Click the Synchronizing enumerations… link to start synchronizing enumerations between ÃÛ¶¹ÊÓƵ Campaign and Microsoft Dynamics.

Campaign and Microsoft Dynamics are now connected. You can set up data synchronization between the two systems. Learn more in the Data synchronization section.

NOTE
You need to make sure to add to the allowlist two URLs: the server URL and login.microsoftonline.com in the Server configuration. For more information on how to configure URL permissions, refer to this page.

Supported field data types ms-dyn-supported-types

For Microsoft Dynamics 365 supported/unsupported attribute types are listed below:

Attribute type
Supported
Basic types : boolean, datetime, decimal, float, double, integer, bigint , string
Yes
Money (as double)
Yes
memo, entityname , primarykey, uniqueidentifier (as strings)
Yes
Status, picklist (we store the possible values in enumerations), state (string)
Yes
owner (as string)
Yes
Lookup (only single entity reference lookups)
Yes
customer
No
Regarding
No
PartyList
No
ManagedProperty
No
MultiSelect Option Set
No
recommendation-more-help
601d79c3-e613-4db3-889a-ae959cd9e3e1