# Configure Microsoft Dynamics 365 (Current)

{% hint style="success" %}
**Available for:** Preference Management Platform (PMP)

**Access Type**: Integrations Manage

**Premium Feature:** Microsoft Dynamic 365
{% endhint %}

In this article, we will cover how to configure the current version of the Didomi/Microsoft Dynamics 365 integration. The following steps can be utilized by organizations who are implementing Microsoft Dynamics 365 for the first time or are migrating their integration from the legacy version to the current version.&#x20;

* [Prerequisites](#prerequisites)
* [Configure Contact Point Consent table/entity](#configure-contact-point-consent-table-entity)
* [Retrieve Microsoft Dynamics 365 credentials](#retrieve-microsoft-dynamics-365-credentials)
* [Enable Microsoft Dynamics 365 (Current) integration](#enable-microsoft-dynamics-365-current-integration)

***

### Prerequisites

Before continuing with the instructions included in this article, ensure that your organization meets the following criteria:

* Didomi account with the Microsoft Dynamics 365 (Current) premium feature enabled&#x20;
* Preference Management Platform (PMP) configured in Didomi account
* Microsoft Dataverse environment with Custom Insights - Journeys enabled

### Configure Contact Point Consent table/entity (CPC)

Didomi pushes end-user preferences to the Contact Point Consent (`msdynmkt_contactpointconsent`) table/entity in Microsoft Dynamics 365. A distinct line item will be added to the Contact Point Consent table for each purpose and/or purpose the end-user submits along with their consent decision for that line item.

{% hint style="info" %}
For example, if an end-user submits decisions on a purpose and three preferences via your privacy widget. The end-user would have four line items in the Contact Point Consent table.
{% endhint %}

Later when enabling the integration in the Didomi console, your organization will decide how different purposes and preferences will map to value options available in Microsoft Dynamics 365. Review the table below for more information on how purposes and preferences will be mapped:

<table data-header-hidden><thead><tr><th width="138.79998779296875"></th><th></th></tr></thead><tbody><tr><td>Purpose</td><td><p>Purposes configured in your organization's Didomi account will target <br>the Purpose (<code>msdynmkt_purpose</code>) column of the Contact Point Consent table. </p><p></p><p>Mapping options for purposes will include any configured options for the column by <code>msdynmkt_purposeId</code>.</p></td></tr><tr><td>Preference</td><td><p>Preferences configured in your organization's Didomi account will target <br>the Topic (<code>msdynmkt_topic</code>) column of the Contact Point Consent table. </p><p></p><p>Mapping options for preferences will include any configured options for the column by <code>msdynmkt_topicId</code>.</p></td></tr></tbody></table>

<figure><img src="/files/PWanWH2TZga0UtvXyEjr" alt="" width="563"><figcaption></figcaption></figure>

In this section, we provide a brief overview on how to edit the available options in the Purpose and Topic columns in your Contact Point Consent table so that they are available during the mapping phase.

{% hint style="warning" %}
**Note**: There are multiple ways to edit the value options for the Purpose and Topic columns in Microsoft Dynamics 365. In this article, we will just focus on editing these columns via Power Apps.
{% endhint %}

{% tabs %}
{% tab title="Purpose" %}
From your organization's Power Apps account, click **Tables** on the left-hand panel.

<figure><img src="/files/BvBhDtFcujWIwbt9Xohg" alt="" width="563"><figcaption></figcaption></figure>

Click the **All** tab on the subsequent page and use the provided search field to search for **Purpose** (`msdynmkt_purpose`).

<figure><img src="/files/fw4Jvmno008MVUwVpYsN" alt="" width="563"><figcaption></figcaption></figure>

Click the ellipsis inline with Purpose (`msdynmkt_purpose`) from the results and select **Edit** from the drop-down menu.

<figure><img src="/files/dsJAxDyntRHL9pLUOT0p" alt="" width="563"><figcaption></figcaption></figure>

Click **+ New row** and follow the instructions to add your organization's value options for purposes.

<figure><img src="/files/mIgjOgQ8aEVCxXMak9a8" alt="" width="563"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Topic" %}
From your organization's Power Apps account, click **Tables** on the left-hand panel.

<figure><img src="/files/BvBhDtFcujWIwbt9Xohg" alt="" width="563"><figcaption></figcaption></figure>

Click the **All** tab on the subsequent page and use the provided search field to search for **Topic** (`msdynmkt_topic`).

<figure><img src="/files/tOfPh5H2Mxfz034pziGU" alt="" width="563"><figcaption></figcaption></figure>

Click the ellipsis inline with Topic (`msdynmkt_topic`) from the results and select **Edit** from the drop-down menu.

<figure><img src="/files/wbwHR3mzqQCjUWcHF8gJ" alt="" width="563"><figcaption></figcaption></figure>

Click **+ New row** and follow the instructions to add your organization's value options for topics.

<figure><img src="/files/begD0BxSceFxLOw2zlzI" alt="" width="563"><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

### Retrieve Microsoft Dynamics 365 credentials

{% hint style="info" %}
if migrating you can skip this step and use the credentials used to configure the legacy version
{% endhint %}

In order to successfully enable the Didomi/Microsoft Dynamics 365 integration your organization will need to retrieve the following credentials from your Microsoft account.

The following credentials can be retrieved from your organizations Microsoft Entra admin center

* Azure tenant ID
* Client ID
* Client secret

In addition to the above credentials, your organization will also need to retrieve the URL for your:

* Server instance.&#x20;

Finding this value will depend on whether your organization deploys Microsoft Dynamics 365 using a cloud-based solution or on-premise deployment.&#x20;

<figure><img src="/files/eI0esAjjP5yS3Tw0FPv3" alt="" width="563"><figcaption></figcaption></figure>

### Enable Microsoft Dynamics 365 (Current) integration&#x20;

Once the Contact Point Consent table/entity is properly configured and your organization's credentials are retrieved from Microsoft Dynamics 365, navigate to the Didomi console and click **Integrations** on the left-hand panel.

Click **Manage**.

<figure><img src="/files/26NcSATdNQlme085jVus" alt="" width="563"><figcaption></figcaption></figure>

Locate Microsoft Dynamics 365 on the subsequent page (it **should not** be labelled Legacy) and click the card.&#x20;

{% hint style="info" %}
If your organization does not find the card for the current Microsoft Dynamics 365 integration please contact your account manager.

Additionally, organizations who are migrating from Microsoft Dynamics 365 (Legacy) to Microsoft Dynamics 365 (Current) will find two cards for the integration. Ensure your organization selects the card **not labelled** Legacy,.
{% endhint %}

<figure><img src="/files/L7qBkpIiRPBAqmTms75D" alt="" width="563"><figcaption></figcaption></figure>

The configuration of the Microsoft Dynamics 365 (Current) integration is comprised of three steps:

* [Settings](#settings)
* [Options](#options)
* [Mapping](#mapping)

#### Settings

In the **Settings** step of the integration configuration, use the provided fields to input your organization's retrieved Microsoft Dynamics 365 credentials.&#x20;

Click **Save settings** when finished.

<figure><img src="/files/4JEglZ6RsTuLcA9xnMhT" alt="" width="563"><figcaption></figcaption></figure>

#### Options

In the **Options** step of the integration configuration, your organization can enable **Upsert mode** if desired. Upset mode authorizes Didomi to create new profiles when pushing end-user preferences to Microsoft Dynamics 365.

{% hint style="info" %}
If Upsert mode is enabled, Didomi will check if the end-user’s `organization_user_id` (provided when the end-user submits their preferences) matches a `msdynmkt_contactpointvalue` in Microsoft Dynamics 365. If no match is found, Didomi will create a new user in Microsoft Dynamics 365 and push the `organization_user_id` to the `msdynmkt_contactpointvalue` field
{% endhint %}

Click **Save options** when finished.

<figure><img src="/files/a2hMs5oYwIlaIzc0H1lR" alt="" width="563"><figcaption></figcaption></figure>

#### Mapping

The **Mapping** step of the integration configuration will populate the purposes and any nested preferences configured for your organization. For any purpose or preference that should be pushed into the Contact Point Consent table, use the provided drop-down menu to select the appropriate mapping.&#x20;

Review the table below for more information on how purposes and preferences map to your Microsoft Dynamics 365 (Current) configuration.

<table data-header-hidden><thead><tr><th width="138.79998779296875"></th><th></th></tr></thead><tbody><tr><td>Purpose</td><td><p>Purposes configured in your organization's Didomi account will target <br>the Purpose (<code>msdynmkt_purpose</code>) column of the Contact Point Consent table. </p><p></p><p>Mapping options for purposes will include any configured attributes for the column by <code>msdynmkt_purposeId</code>.</p></td></tr><tr><td>Preference</td><td><p>Preferences configured in your organization's Didomi account will target <br>the Topic (<code>msdynmkt_topic</code>) column of the Contact Point Consent table. </p><p></p><p>Mapping options for preferences will include any configured attributes for the column by <code>msdynmkt_topicId</code>.</p></td></tr></tbody></table>

Select the drop-down menu inline with a purpose or preference and select the value options from the list. Repeat as necessary.

Click **Save mapping** when finished.

<figure><img src="/files/9WaErgxVP60JtOD0XCN7" alt="" width="563"><figcaption></figcaption></figure>

The Didomi/Microsoft Dynamics 365 (Current) integration is successfully enabled.&#x20;

To test the integration, navigate to where the Didomi preference widget is deployed and submit your selections. Check Microsoft Dynamics 365 and ensure that your selections are reflected appropriately in the Contact Point Consent table.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.didomi.io/integrations/marketing-automation/microsoft-dynamics-365/configure-microsoft-dynamics-365-current.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
