# Dynamics 365 CRM

This Integration requires Fides Cloud or Fides Enterprise. For more information, [talk to our solutions team. (opens in a new tab)](/content/speak-with-us?utm_source=docs-site/index.html)

[Dynamics 365 CRM (opens in a new tab)](https://dynamics.microsoft.com/) is a customer relationship management platform built on Microsoft Dataverse that stores contact, lead, account, activity, and transactional data, accessible via an OData 4.0 REST API.

OAuth 2.0 must be configured ahead of time to authorize requests against this service.

## Prerequisites [Permalink for this section](/content/docs/integrations/saas-integrations/dynamics-365-crm#prerequisites/index.html)

In order to integrate with Dynamics 365 CRM, you'll need to complete the following setup in Microsoft Entra ID and Power Platform, then collect the required credentials:

1. **Register an application in Microsoft Entra ID** — record the Application (client) ID, Directory (tenant) ID, and a Client secret or certificate. [Docs (opens in a new tab)](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/walkthrough-register-app-azure-active-directory)
2. **Create an Application User in Power Platform Admin Center** — map it to the Entra app registration. This is unlicensed (free). [Docs (opens in a new tab)](https://learn.microsoft.com/en-us/power-platform/admin/manage-application-users)
3. **Create and assign a custom security role** (e.g., "Fides DSR Connector") with Read and Write access on all supported entity types. [Docs (opens in a new tab)](https://learn.microsoft.com/en-us/power-platform/admin/create-edit-security-role)

Once setup is complete, you'll need to collect the following information:

| Field | Description |
| --- | --- |
| **Organization URL** | Your Dynamics 365 instance URL (e.g., `https://yourorg.crm.dynamics.com`). The regional hostname varies by deployment — see [Microsoft's regional endpoints (opens in a new tab)](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/overview) for your region. |
| **Client ID** | The Application (client) ID from your Microsoft Entra app registration. |
| **Client secret** | The client secret generated for your Entra app registration. |
| **Tenant ID** | The Directory (tenant) ID from your Microsoft Entra app registration. |

## Integrating with Dynamics 365 CRM [Permalink for this section](/content/docs/integrations/saas-integrations/dynamics-365-crm#integrating-with-dynamics-365-crm/index.html)

To integrate an existing system with Dynamics 365 CRM:

1. Navigate to **Data map** → **View Systems** and choose the system that you want to connect.
2. Click on the **Integrations** tab.
3. Pick the vendor or system type that you want to integrate with from the **Connection type** drop-down menu.
4. Complete the required fields for the integration and click **Save**.

To authorize the integration so that it can connect to Dynamics 365 CRM:

1. Click on **Authorize integration** to be redirected to the Microsoft authorization screen.
2. Enter your Microsoft credentials and click **Log in**.
3. You will automatically be redirected back to the Fides UI using the Redirect URL that was provided in the form in the previous step.

You may confirm your connection is working using the **Test connection** button, if desired.

To learn more, please see our guide for [Managing Integrations](/content/docs/integrations/guides/manage-integrations/index.html).

## Technical detail [Permalink for this section](/content/docs/integrations/saas-integrations/dynamics-365-crm#technical-detail/index.html)

Fides utilizes _API endpoints_ to access the _API service_ for a SaaS application. An _API service_ is the programmatic interface through which Fides can query and update data within an application to access, rectify, or delete personal information. Each SaaS tool will have a unique set of endpoints to enable privacy functions.

Dynamics 365 CRM does not have a dedicated DSR API. Fides composes data subject requests using standard Dataverse Web API operations. Access uses OData `$batch` to bundle all collection queries into two HTTP calls per request. Erasure masks personal data in place using `PATCH` requests — string fields (names, phone numbers, addresses) are overwritten with "MASKED", and typed fields with format constraints (`birthdate`, `gendercode`) are set to `null`. Records are never deleted. Sales Orders are returned in access requests but are not modified during erasure.

In the table below, you can find which endpoints are used for each type of privacy function.

### Dynamics 365 CRM endpoints [Permalink for this section](/content/docs/integrations/saas-integrations/dynamics-365-crm#dynamics-365-crm-endpoints/index.html)

| Privacy function | Endpoint | Description |
| --- | --- | --- |
| **Access** | [Contacts (opens in a new tab)](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/execute-batch-operations-using-web-api) | Retrieves contact records matched by email address, including name, email, phone, birthdate, and government ID. |
| **Access** | [Leads (opens in a new tab)](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/execute-batch-operations-using-web-api) | Retrieves lead records matched by email address, including name, email, phone, and company. |
| **Access** | [Activity Parties (opens in a new tab)](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/execute-batch-operations-using-web-api) | Retrieves activity participation records where the data subject's email was used as a recipient. |
| **Access** | [Customer Addresses (opens in a new tab)](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/execute-batch-operations-using-web-api) | Retrieves postal addresses linked to a discovered contact. |
| **Access** | [Annotations (opens in a new tab)](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/execute-batch-operations-using-web-api) | Retrieves notes and attachments linked to a discovered record. |
| **Access** | [Incidents (opens in a new tab)](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/execute-batch-operations-using-web-api) | Retrieves support case records linked to a discovered contact. |
| **Access** | [Quotes (opens in a new tab)](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/execute-batch-operations-using-web-api) | Retrieves quote records linked to a discovered contact, including billing and shipping addresses. |
| **Access** | [Sales Orders (opens in a new tab)](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/execute-batch-operations-using-web-api) | Retrieves sales order records linked to a discovered contact, including billing and shipping addresses. |
| **Access** | [Invoices (opens in a new tab)](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/execute-batch-operations-using-web-api) | Retrieves invoice records linked to a discovered contact, including billing and shipping addresses. |
| **Erasure** | [Contacts (opens in a new tab)](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/reference/contact) | Masks name, phone, and email fields with "MASKED"; sets `birthdate` and `gendercode` to `null`. |
| **Erasure** | [Leads (opens in a new tab)](https://learn.microsoft.com/en-us/dynamics365/developer/reference/entities/lead) | Masks name and phone fields with "MASKED". |
| **Erasure** | [Activity Parties (opens in a new tab)](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/reference/activityparty) | Masks the `addressused` (email) field. |
| **Erasure** | [Customer Addresses (opens in a new tab)](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/reference/customeraddress) | Masks `stateorprovince` and `postalcode` with "MASKED". |
| **Erasure** | [Annotations (opens in a new tab)](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/reference/annotation) | Masks `subject` and `notetext` fields. |
| **Erasure** | [Incidents (opens in a new tab)](https://learn.microsoft.com/en-us/dynamics365/developer/reference/entities/incident) | Masks `title` and `description` fields. |
| **Erasure** | [Quotes (opens in a new tab)](https://learn.microsoft.com/en-us/dynamics365/developer/reference/entities/quote) | Masks billing and shipping `stateorprovince` and `postalcode` fields with "MASKED". |
| **Erasure** | [Invoices (opens in a new tab)](https://learn.microsoft.com/en-us/dynamics365/developer/reference/entities/invoice) | Masks billing and shipping `stateorprovince` and `postalcode` fields with "MASKED". |
| **Access only** | [Sales Orders (opens in a new tab)](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/execute-batch-operations-using-web-api) | Returned in access requests. Erasure is not supported for this collection.
