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

# Microsoft Dynamics 365

> Sync Dynamics 365 CRM accounts, contacts, opportunities, cases, and owners from Dataverse so product insights carry revenue and customer context.

Connect Microsoft Dynamics 365 to ClosedLoop AI to enrich product insights with CRM context from Dataverse. ClosedLoop AI reads account, contact, opportunity, case, and owner metadata so product teams can understand which customers are asking, what revenue is attached, and where an account sits in the sales or support motion.

<Note>Microsoft Dynamics 365 is a **metadata-only** integration. CRM data enriches existing product insights and does not consume AI analysis credits.</Note>

## What Gets Synced

| Data          | Description                                                                 |
| ------------- | --------------------------------------------------------------------------- |
| Accounts      | Account name, website, industry, employee count, revenue, and owner         |
| Contacts      | Names, emails, titles, account associations, and owner                      |
| Opportunities | Stage, amount, close date, owner, account, and native open/won/lost status  |
| Cases         | Case subject, status, priority, account, contact, and owner                 |
| Owners        | Dataverse users used for account, contact, opportunity, and case assignment |

## Connection Method

Microsoft Dynamics 365 uses **OAuth 2.0** authentication against your Dataverse environment. During setup, enter your Dataverse environment URL, such as `contoso.crm.dynamics.com`, then authorize ClosedLoop AI with a Microsoft user that has read access to CRM records.

ClosedLoop AI stores one Dataverse environment per ClosedLoop AI team in this first version. Multi-environment support can be added later if a team needs separate production, sandbox, or regional Dynamics environments.

## Setup Guide

<AccordionGroup>
  <Accordion icon="plug" title="Connect your Dataverse environment">
    1. In ClosedLoop AI, navigate to **Integrations**
    2. Find **Microsoft Dynamics 365** and click **Connect**
    3. Enter your Dataverse environment URL, for example `contoso.crm.dynamics.com`
    4. Sign in with a Microsoft user that has read access to accounts, contacts, opportunities, cases, and users
    5. Review the requested permissions and approve the connection
    6. You'll be redirected back to ClosedLoop AI, and the integration will begin syncing metadata

    <Warning>The connecting user's Dataverse permissions determine what ClosedLoop AI can sync. Use an account with broad read access to the CRM objects you want to enrich.</Warning>
  </Accordion>
</AccordionGroup>

## OAuth Scope

ClosedLoop AI requests the Dataverse environment-scoped permission:

| Scope                                  | Purpose                                                             |
| -------------------------------------- | ------------------------------------------------------------------- |
| `{environment-url}/user_impersonation` | Read CRM data through the Dataverse Web API as the authorized user  |
| `offline_access`                       | Keep the connection active without asking the user to sign in again |
| `openid profile email`                 | Identify the Microsoft user who authorized the connection           |

No write, delete, or admin scopes are requested. ClosedLoop AI cannot create, modify, or delete records in your Dataverse environment.

## How Enrichment Works

Dynamics 365 data enriches product insights automatically:

1. Product feedback arrives from calls, chat, surveys, webhooks, or MCP
2. ClosedLoop AI analyzes the feedback independently
3. On query, CRM metadata is joined to add account, contact, opportunity, and case context
4. Revenue and customer context help product teams prioritize the product insights with the highest business impact

<Card title="Connect Microsoft Dynamics 365" icon="plug" href="https://app.closedloop.sh/integrations">
  Set up your Dynamics 365 integration in the ClosedLoop AI dashboard
</Card>
