> ## Documentation Index
> Fetch the complete documentation index at: https://docs.retellai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Dynamics 365

> Connect Microsoft Dynamics 365 to Retell AI with OAuth: find your Dataverse environment URL, sign in with Microsoft, and verify the connection works.

Connecting Microsoft Dynamics 365 takes your environment URL and a Microsoft sign-in. One connection covers both [contact sync](/integrations/microsoft-dynamics-contact-sync) and [agent functions](/integrations/microsoft-dynamics-functions): your agents work your Contacts, Tasks, and Notes live, and Retell keeps the records current. This page covers what you need on the Microsoft side and how to connect.

## When to use it

Connect Dynamics 365 when it's your system of record and you want your agents working from it without anyone copying data between tools. It's the right choice when you want to:

* **Call or text people who already exist in Dynamics.** Contacts sync into Retell automatically, so your agent greets callers by name and knows their details instead of asking.
* **Keep Dynamics current without manual data entry.** Analysis results from each conversation write back to fields on the Contact record.
* **Give your team call history where they already work.** Each call lands on the Contact's timeline as a completed Phone Call activity; each chat lands as a Task.

Your agents can also look up and manage Contacts, Tasks, and Notes through [integration tools](/integrations/microsoft-dynamics-functions#available-tools).

For example, a home-services company syncs its Dynamics Contacts into Retell. Its outbound reminder agent greets each customer by name, confirms tomorrow's appointment window, writes the confirmed time back to the Contact, and the call lands on the timeline as a completed Phone Call activity.

## Prerequisites

* A Dynamics 365 environment on Dataverse (Retell talks to its Web API, `/api/data/v9.2`).
* A Microsoft work account with access to that environment, holding a security role that can read and write **Contacts**, **Tasks**, **Phone Calls**, and **Notes**.
* Retell acts as whoever signs in, so tasks and activities it creates are attributed to that account. Use a dedicated integration user rather than a person's account, so the connection doesn't break when someone changes roles or leaves.

## Step 1: Find your environment URL

Retell needs the environment's Dataverse URL, which looks like `https://your-org.crm.dynamics.com` (the region segment varies, for example `crm4` or `crm11`).

* The easiest place to read it is your browser's address bar while you're using the Dynamics app — everything up to and including `.dynamics.com`.
* Admins can also find it in the **Power Platform admin center** under **Environments**, as the environment's **Environment URL**.

<Frame caption="Reading the environment URL from the browser's address bar.">
  <div style={{ aspectRatio: '16 / 9', width: '100%', background: 'rgba(128,128,128,0.15)', display: 'flex', alignItems: 'center', justifyContent: 'center', borderRadius: '8px', overflow: 'hidden' }}>
    <img src="https://mintcdn.com/retellai/eQ17pyeTZnmNJIsQ/images/integration/microsoft-dynamics-environment-url.png?fit=max&auto=format&n=eQ17pyeTZnmNJIsQ&q=85&s=5be5f9d0e1448a2caf5c0af8e0f147e9" alt="A Dynamics 365 Customer Service Hub dashboard open in a browser. The address bar is highlighted with a blue ring, showing an environment URL ending in .crm.dynamics.com with the organization's subdomain redacted. The dashboard's case data is also redacted." style={{ maxWidth: '100%', maxHeight: '100%', objectFit: 'contain' }} width="1792" height="986" data-path="images/integration/microsoft-dynamics-environment-url.png" />
  </div>
</Frame>

Enter just the origin, with no path after `.dynamics.com`.

## Step 2: Connect Dynamics 365 in Retell

<Steps>
  <Step title="Add the connection">
    In the Retell Dashboard, open **Integrations**, select the **Available** tab, find **Microsoft Dynamics 365**, and click **Connect** (**Add Account** if a connection already exists).
  </Step>

  <Step title="Enter the environment URL and sign in">
    Fill in the fields:

    | Field                        | Value                                                                       |
    | ---------------------------- | --------------------------------------------------------------------------- |
    | **Connection name**          | Alias for this connection; prefilled with `Microsoft Dynamics 365 - OAuth`. |
    | **Dynamics environment URL** | The URL from Step 1, for example `https://your-org.crm.dynamics.com`.       |

    <Frame caption="The Microsoft Dynamics 365 connection dialog: environment URL, then an OAuth sign-in.">
      <div style={{ aspectRatio: '16 / 9', width: '100%', background: 'rgba(128,128,128,0.15)', display: 'flex', alignItems: 'center', justifyContent: 'center', borderRadius: '8px', overflow: 'hidden' }}>
        <img src="https://mintcdn.com/retellai/eQ17pyeTZnmNJIsQ/images/integration/microsoft-dynamics-connect-dialog.png?fit=max&auto=format&n=eQ17pyeTZnmNJIsQ&q=85&s=d8a6aab28e1f50b06ff8d0905f057add" alt="Retell's Microsoft Dynamics 365 connection dialog on its Connect tab, with a Functions tab beside it. It has a Connection name field prefilled with Microsoft Dynamics 365 - OAuth and a Dynamics environment URL field with the placeholder https://your-org.crm.dynamics.com, above a Need help finding your credentials link and Cancel and Add Account buttons." style={{ maxWidth: '100%', maxHeight: '100%', objectFit: 'contain' }} width="1202" height="1002" data-path="images/integration/microsoft-dynamics-connect-dialog.png" />
      </div>
    </Frame>

    Click **Connect** (**Add Account** if a connection already exists). A Microsoft sign-in window opens; sign in with the integration account and accept the requested access. Retell stores a refresh token, so nobody has to sign in again.

    <Note>
      If your organization restricts which apps users may consent to, Microsoft shows an approval-required message instead of the consent screen. A Microsoft Entra admin then has to grant consent for Retell before the connection can complete.
    </Note>
  </Step>

  <Step title="Verify it worked">
    Retell tests the connection by calling the environment's WhoAmI endpoint as the signed-in user. On success the connection appears on the **Connected** tab and the dialog offers **Set up contact sync** — see [Dynamics 365 contact sync](/integrations/microsoft-dynamics-contact-sync) to import your Contacts, or start using [agent functions](/integrations/microsoft-dynamics-functions) right away.
  </Step>
</Steps>

## Troubleshooting

<AccordionGroup>
  <Accordion title="The sign-in completes but the connection test fails">
    The signed-in account can authenticate against Microsoft without having access to the environment you entered. Confirm the account can open that environment in a browser, and that the URL is the environment's own Dataverse origin with nothing after `.dynamics.com`.
  </Accordion>

  <Accordion title="Sign-in ends on an approval-required message">
    Your organization requires admin consent for new apps. Ask a Microsoft Entra admin to grant consent for Retell, then connect again. Separately, Power Platform admins can restrict which client apps may access a specific environment — if consent is granted but calls are still refused, check the environment's app access controls in the Power Platform admin center.
  </Accordion>

  <Accordion title="The connection errored after working for a while">
    Retell flags a connection as errored when Microsoft rejects the stored token — typically because the integration account's password was reset, the account was disabled, or an admin revoked the app's access. Open the connection's settings and click **Reconnect** to sign in again with a working account.
  </Accordion>
</AccordionGroup>

## FAQ

<AccordionGroup>
  <Accordion title="Who do the logged activities belong to?">
    Everything Retell creates is owned by the account that signed in when connecting. That's why a dedicated integration user is worth setting up: the timeline then reads "Retell integration" rather than a teammate's name.
  </Accordion>

  <Accordion title="Can I connect more than one environment?">
    Yes, add one connection per environment. Only one CRM connection in your workspace can drive [contact sync](/integrations/microsoft-dynamics-contact-sync) at a time, across every provider — the **Contact sync** toggle in a connection's settings decides which one. Integration tools work on every connection.
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Dynamics 365 contact sync" icon="rotate" href="/integrations/microsoft-dynamics-contact-sync">
    Import your Dynamics Contacts, write analysis results back, and log calls on the Contact's timeline.
  </Card>

  <Card title="Dynamics 365 agent functions" icon="wrench" href="/integrations/microsoft-dynamics-functions">
    Look up callers, update Contacts, and create Tasks and Notes mid-conversation.
  </Card>

  <Card title="Integrations overview" icon="plug" href="/integrations/overview">
    See every provider Retell connects to and how integration tools work.
  </Card>

  <Card title="CRM integrations" icon="database" href="/integrations/crm-overview">
    How contact sync, analysis mapping, and activity logging work across CRM providers.
  </Card>
</CardGroup>
