> AI agents: this is one page from Mammoth Analytics documentation. The index of all pages as Markdown is https://mammoth.io/docs/llms.txt. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get Markdown.

# Connect Microsoft Dynamics 365 to Mammoth

> Connect Mammoth to Microsoft Dynamics 365 with Azure app credentials and your organization URL, pick entities and columns, and save a refreshing dataset.

The Microsoft Dynamics connector imports CRM and business data from your **Microsoft Dynamics 365** environment into Mammoth as a dataset. It signs in with Azure app credentials (Tenant ID, Client ID, Client Secret), so the connection belongs to an app, not one person's account. Open it from **Data Library** > **New dataset** > **Connectors** and search for **Microsoft Dynamics**. Project Admins create the connection; Project Editors can start datasets from a connection the project already has. Which connectors you can add depends on your plan.

## What you can bring in from Dynamics 365

- The entities (tables) the app's security role can read, and the columns you tick.
- Data you ask for in the **Chat**. The agent picks tables and columns for you.

The dataset can refresh daily or only when you ask.

## Before you connect Dynamics 365

You need an **Azure Active Directory app** with access to your Dynamics 365 environment. A Microsoft 365 or Dynamics admin usually does this once.

You also need your environment's organization URL, for example `https://yourorg.crm.dynamics.com`. Use your environment-specific URL, not the Microsoft discovery service URL (`organizations.crm.dynamics.com`).

### Register the Azure AD app for Dynamics

1. Go to [Azure Portal](https://portal.azure.com) → **Azure Active Directory → App registrations**.
2. Click **New registration**, name it (for example `Mammoth Dynamics`), and click **Register**.
3. Copy the **Application (client) ID**. This is your **Client ID**.
4. Copy the **Directory (tenant) ID**. This is your **Tenant ID**.
5. Go to **Certificates & secrets → New client secret**, add a description, set an expiry, and click **Add**.
6. Copy the secret **Value** at once; it won't be shown again. This is your **Client Secret**.
7. In your Dynamics 365 admin center, add the app as an **application user** with a security role that can read the entities you want.

## Connect Microsoft Dynamics to Mammoth

1. Go to the **Data Library**, click **New dataset**, and choose **Connectors**.
2. Search for **Microsoft Dynamics** and click its tile. The connector workspace opens with the **Chat** connecting Dynamics.
3. Fill in all four fields below in the chat's card and connect. There's no sign-in step, because the connector uses the app credentials.

If you already have a Dynamics connection, pick it under **Your connections** in the launcher instead. See [Connect a database or app](https://mammoth.io/docs/learn/get-data-in/connect-a-source/) for the shared steps.

![Microsoft Dynamics New Connection form with Dynamics Organization URL, Tenant ID, Client ID, and Client Secret fields](https://mammoth.io/docs/images/20260826_114154_styled.webp)

| Field | What to enter | Example |
| --- | --- | --- |
| **Dynamics Organization URL** | Your Dynamics 365 environment URL | `https://yourorg.crm.dynamics.com` |
| **Tenant ID** | Azure AD Directory (tenant) ID | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` |
| **Client ID** | Azure AD Application (client) ID | `yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy` |
| **Client Secret** | The app secret value you created | |

## Pick Dynamics entities and columns

1. In **Tables**, click an entity to see its columns and sample rows.
2. Tick the columns you want. They gather in **Your table**.
3. Click **Preview 100 rows** to check the result.



## Save Dynamics data as a dataset

1. Click **Save as dataset**.
2. Enter a **Dataset name** and pick the folder under **Save in**.
3. Under **Keep it up to date**, choose **Daily** or **Manual**.
4. Click **Save**.

## Refresh Dynamics data and choose an update method

Choosing **Daily** creates a [Dataset Refresh](https://mammoth.io/docs/learn/automate/refresh-a-dataset/) automation that you can reschedule later.

After the dataset is saved, its **Update method** offers only two options:

| Update method | What it does |
| --- | --- |
| **Replace all data** | Rebuilds the dataset from the source on every refresh |
| **Add to existing data** | Adds every row the refresh brings in to the rows you already have |

Dynamics refreshes don't use a key column, so Mammoth can't add only new rows.

## Troubleshoot Microsoft Dynamics connections

| Symptom | Likely cause | Fix |
| --- | --- | --- |
| "Authentication Failure. Please check your Microsoft credentials." | A value is copied wrong | Check **Dynamics Organization URL**, **Tenant ID**, **Client ID** and **Client Secret** |
| Mammoth says the Organization URL appears to be the Microsoft Discovery Service URL | You entered the discovery URL | Replace it with your environment URL, for example `https://yourorg.crm.dynamics.com` |
| Access denied (403) | The app isn't an application user | Add the app registration as an Application User in Dynamics 365 with the required security role |
| Authentication stops working later | The client secret expired | Generate a new secret in Azure Portal, then update the connection in **Data → Connections** with **Edit connection** |
| An entity isn't in the list | The security role can't read it | Give the application user a security role with read access to that entity |

## Related

- [Connect a database or app](https://mammoth.io/docs/learn/get-data-in/connect-a-source/): the shared connector workspace steps.
- [Manage saved connections](https://mammoth.io/docs/learn/get-data-in/connections/): update the connection when a secret expires.
- [Refresh a dataset](https://mammoth.io/docs/learn/automate/refresh-a-dataset/): change when the dataset refreshes.
- [Salesforce](https://mammoth.io/docs/learn/get-data-in/connectors/salesforce/): import CRM data from Salesforce.
- [Connector reference](https://mammoth.io/docs/learn/get-data-in/connectors/): every source Mammoth connects to.

---
Source: https://mammoth.io/docs/learn/get-data-in/connectors/microsoft-dynamics.md · Updated: 2026-11-08
