# Configure Microsoft Dynamics 365 (Legacy)

{% 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 legacy version of the Didomi/Microsoft Dynamics 365 integration.

{% hint style="warning" %}
**Note**: This article is currently maintained for existing organizations that have implemented the Microsoft Dynamics 365 (Legacy) integration with Didomi. These organizations are strongly encouraged to [update and migrate their integration](/integrations/marketing-automation/microsoft-dynamics-365/configure-microsoft-dynamics-365-current.md) to utilize the current iteration of the Didomi/Microsoft Dynamics 365 integration
{% endhint %}

* [Prerequisites](#prerequisites)
* [Configure Contact table/entity](#configure-contact-table-entity)
* [Retrieve Microsoft Dynamics 365 credentials](#retrieve-microsoft-dynamics-365-credentials)
* [Enable Microsoft Dynamics 365 (Legacy) integration](#enable-microsoft-dynamics-365-legacy-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 (Legacy)
* Configuration tree in your Didomi account
* Microsoft Dataverse environment

### Configure Contact table/entity

Didomi pushes end-user preferences to the Contact (`contact`) table/entity in Microsoft Dynamics 365. A single row will be added to the Contact table with each purpose and preference stored as a separate column.

Later when enabling the integration in the Didomi console, your organization will decide how different purposes and preferences will map to the different columns in Microsoft Dynamics 365.

### Retrieve Microsoft Dynamics 365 credentials

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 (Legacy) integration

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 and click the card.&#x20;

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

The configuration of the Microsoft Dynamics 365 (Legacy) 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 contact in Microsoft Dynamics 365. If no match is found, Didomi will create a new user in Microsoft Dynamics 365.
{% 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 columns you have configured for the Contact table. End-user consent and preferences is stored with each purpose and preference stored as a separate column in a single row for the end-user

Select the drop-down menu inline with a purpose or preference and select the appropriate column name configured in Microsoft Dynamics 365 from the list. Repeat as necessary.

Click **Save mapping** when finished.

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

The Didomi/Microsoft Dynamics 365 (Legacy) 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 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-legacy.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.
