# Dynamics365

Churned integrates with Dynamics 365 to sync customer data, automate workflows, and enhance engagement tracking.

### How to Connect Dynamics 365 to Churned

1. Log in to the Churned platform and navigate to the “Integrations” section.
2. Click “New Integration” and select Dynamics 365 from the list.
3. You will be prompted to enter the following credentials:

#### Required Credentials

* clientId – The Application (client) ID from Azure.
* clientSecret – The secret key associated with the application.
* resource – The Dynamics 365 service URL (e.g., <https://yourorg.crm.dynamics.com>).
* tenantId – The Azure Directory (tenant) ID.

### How to Retrieve Your Dynamics 365 Credentials

#### 1. Get the clientId and clientSecret

1. Sign in to the Microsoft Azure Portal (<https://portal.azure.com>).
2. Navigate to Azure Active Directory > App registrations.
3. Select your registered app or create a new one.
4. Copy the Application (client) ID – this is your clientId.
5. Under Certificates & secrets, generate a new client secret, then copy it – this is your clientSecret.

#### 2. Get the resource URL

1. Go to your Dynamics 365 instance.
2. Copy the base URL (e.g., <https://yourorg.crm.dynamics.com>).

#### 3. Get the tenantId

1. In the Azure Portal, go to Azure Active Directory > Overview.
2. Copy the Tenant ID.

### Final Steps

1. Enter all the credentials in the Churned integration form.
2. Click Save and test the connection.
3. Once connected, notify the Churned team to synchronize data.

### Helpful Links

* [Dynamics 365 API Documentation](https://learn.microsoft.com/en-us/dynamics365/customer-engagement/web-api/)


---

# 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.churned.io/churned-docs/integrations/dynamics365.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.
