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

# Microsoft Dynamics 365 Finance & Operations

Microsoft Dynamics 365 Finance & Operations (F\&O) is an enterprise ERP platform by Microsoft covering finance, procurement, supply chain, and manufacturing. Connecting it to Duvo lets your agents query customers, vendors, legal entities, and other business data directly from your F\&O environment through its OData API.

## Setup

<Steps>
  <Step title="Confirm prerequisites" icon="circle-check">
    <Check>A Microsoft Entra (Azure AD) app registration with the **Microsoft Dynamics ERP** API permission (listed as `Microsoft.ERP` in the Azure portal) and admin consent granted.</Check>
    <Check>A client secret generated for the app registration in the Azure portal under **Certificates & secrets**.</Check>
    <Check>The app registration mapped in your F\&O environment under **System administration > Setup > Microsoft Entra applications**, with the Client ID entered, a service account user assigned, and the State set to Enabled.</Check>
    <Check>The service account user in F\&O assigned security roles that grant at least read access to the data entities your agents need (for example, customers, vendors, and legal entities).</Check>

    <Tip>
      New to app registrations? Follow [Register an application in Microsoft Entra ID](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app) to create the app registration and generate client secrets.
    </Tip>
  </Step>

  <Step title="Grant the required permissions" icon="key">
    * The Azure AD app registration must have **API permissions** for the **Microsoft Dynamics ERP** API (`Microsoft.ERP`) with admin consent granted at the tenant level.
    * The mapped F\&O application user must be assigned security roles that cover the data entities you plan to query. For read-only access to customers and vendors, a role such as **Accounts receivable clerk** and **Accounts payable clerk** (or a custom role with equivalent privileges) is sufficient.

    <Warning>
      The F\&O security roles assigned to the service account user determine exactly which data entities the agent can reach. Scope them to only the entities the agent needs.
    </Warning>
  </Step>

  <Step title="Add the connection in Duvo" icon="plug">
    On the [Connections page](https://app.duvo.ai/integrations), open Microsoft Dynamics 365 Finance & Operations and fill in these fields:

    <ParamField body="Environment URL" type="URL" required>
      Your F\&O environment base URL (for example, `https://your-instance.operations.dynamics.com`). Find it in Lifecycle Services or your browser address bar when logged into F\&O.
    </ParamField>

    <ParamField body="Tenant ID" type="string" required>
      Your Microsoft Entra tenant GUID. Find it in the Azure portal under **Microsoft Entra ID > Overview** or **App registrations**.
    </ParamField>

    <ParamField body="Client ID" type="string" required>
      The Application (client) ID from the Azure AD app registration that has F\&O API permissions.
    </ParamField>

    <ParamField body="Client Secret" type="string" required>
      A client secret generated for the app registration. Found under **Certificates & secrets** in the Azure portal.
    </ParamField>

    <ParamField body="Legal Entity" type="string">
      A company code (dataAreaId) such as `USMF`. Scopes all queries to this company by default. If left blank and only one legal entity exists, Duvo selects it automatically.
    </ParamField>

    <ParamField body="Token URL (Advanced)" type="URL">
      Override for the Microsoft token endpoint. Defaults to `https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token`. Only change this if your tenant uses a custom authority.
    </ParamField>

    <ParamField body="Scope (Advanced)" type="string">
      Override for the OAuth scope. Defaults to `{environmentUrl}/.default`. Only change this if your environment requires a non-standard scope.
    </ParamField>
  </Step>
</Steps>

<AccordionGroup>
  <Accordion title="Third-party documentation" icon="book">
    * [Register an application in Microsoft Entra ID](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app) — creating the app registration and generating client secrets.
    * [Service endpoints overview (Finance & Operations)](https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/services-home-page) — registering external applications and configuring Microsoft Entra applications in F\&O.
    * [OData service endpoints (Finance & Operations)](https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/odata) — available data entities and OData query capabilities.
  </Accordion>
</AccordionGroup>

## Capabilities

* **Query customers** — list, filter, sort, and paginate customer records from the CustomersV3 entity, including contact details, payment terms, and addresses.
* **Query vendors** — list, filter, sort, and paginate vendor records from the VendorsV2 entity with full supplier details.
* **Look up full partner details** — retrieve comprehensive information for a single customer or vendor by account number, returned as a formatted record with all available fields.
* **Search across business partners** — run a simultaneous search across both customers and vendors by name to quickly find matching records.
* **Discover legal entities** — list all legal entities (company codes) in your F\&O environment to identify the right data scope for other queries.
* **Run flexible OData queries** — execute custom OData queries against allowed data entities with filtering, field selection, sorting, and pagination for scenarios not covered by the built-in tools.

## Key Benefits

* **Direct ERP access** — agents read from your F\&O environment in real time instead of relying on manual data exports or screen-by-screen navigation.
* **Cross-company querying** — query across all legal entities at once or scope to a single company, without switching sessions in F\&O.
* **Secure credential handling** — Azure AD client credentials are encrypted at rest and designed to avoid exposure in logs or API responses.
* **Denormalized data** — F\&O data entities include related information (addresses, contacts, payment terms) as top-level fields, so agents get complete records in a single query.
* **Finance-ready data** — pull customer credit limits, vendor records, and company information for reconciliation, reporting, and compliance workflows.

## Works Well With

<CardGroup cols={3}>
  <Card title="Google Sheets" icon="https://mintcdn.com/duvo-d8027998/O3tlM6eCuFk2uJpN/images/connections/google-sheets.svg?fit=max&auto=format&n=O3tlM6eCuFk2uJpN&q=85&s=0ef8d55e05c34e7a4a618933bdf0ceb3" href="/user-guide/connections/available-connections/google-sheets" width="24" height="24" data-path="images/connections/google-sheets.svg">
    Pull F\&O customer or vendor data into spreadsheets for financial analysis, reconciliation, or reporting.
  </Card>

  <Card title="Microsoft Excel" icon="https://mintcdn.com/duvo-d8027998/O3tlM6eCuFk2uJpN/images/connections/excel.svg?fit=max&auto=format&n=O3tlM6eCuFk2uJpN&q=85&s=986599d60d09acee47293fda2b62df99" href="/user-guide/connections/available-connections/microsoft-excel" width="2290" height="2130" data-path="images/connections/excel.svg">
    Pull F\&O customer or vendor data into spreadsheets for financial analysis, reconciliation, or reporting.
  </Card>

  <Card title="Gmail" icon="https://mintcdn.com/duvo-d8027998/O3tlM6eCuFk2uJpN/images/connections/gmail.svg?fit=max&auto=format&n=O3tlM6eCuFk2uJpN&q=85&s=ad4e229283f3fe2f26c0f96a49f28e13" href="/user-guide/connections/available-connections/gmail" width="88" height="66" data-path="images/connections/gmail.svg">
    Retrieve business partner details and include them in automated notification or approval emails.
  </Card>

  <Card title="Microsoft Outlook" icon="https://mintcdn.com/duvo-d8027998/O3tlM6eCuFk2uJpN/images/connections/outlook.svg?fit=max&auto=format&n=O3tlM6eCuFk2uJpN&q=85&s=e29aeb65c8cffce1cd3c83b81289b71f" href="/user-guide/connections/available-connections/microsoft-outlook" width="1831" height="1703" data-path="images/connections/outlook.svg">
    Retrieve business partner details and include them in automated notification or approval emails.
  </Card>

  <Card title="Slack" icon="https://mintcdn.com/duvo-d8027998/O3tlM6eCuFk2uJpN/images/connections/slack.svg?fit=max&auto=format&n=O3tlM6eCuFk2uJpN&q=85&s=8a64bdd1af39e903923e4a273b4a4618" href="/user-guide/connections/available-connections/slack" width="512" height="512" data-path="images/connections/slack.svg">
    Post alerts and status updates based on F\&O data to the relevant business channels.
  </Card>

  <Card title="Microsoft Teams" icon="https://mintcdn.com/duvo-d8027998/O3tlM6eCuFk2uJpN/images/connections/teams.svg?fit=max&auto=format&n=O3tlM6eCuFk2uJpN&q=85&s=6402a90678b560d0b0a4fc3b02c0d3e0" href="/user-guide/connections/available-connections/microsoft-teams" width="2229" height="2073" data-path="images/connections/teams.svg">
    Post alerts and status updates based on F\&O data to the relevant business channels.
  </Card>
</CardGroup>
