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

# Microsoft Dynamics

> Connect Opengeni to Dynamics 365 Sales and other Dataverse apps, Business Central, or Finance and Operations, with each person's Microsoft work account or one account shared with the workspace.

The Microsoft Dynamics connection lets Opengeni agents read and change your
Dynamics 365 data. By default each person signs in with their own Microsoft
work account, and every call runs with that person's Dynamics security roles.
Anyone who may add connections for the workspace can instead share one account
with everyone in it; everyone then acts with that person's Dynamics roles.

| Product | Environment URL you enter | Status |
| - | - | - |
| Dynamics 365 Sales, Customer Service and other Dataverse apps | `https://<org>.crm.dynamics.com` (or `crm4`, `crm17`, …) | Available |
| Dynamics 365 Business Central | `https://businesscentral.dynamics.com/<tenant>/<environment>` | Available |
| Dynamics 365 Finance and Operations | `https://<env>.operations.dynamics.com` (or regional, such as `https://<env>.operations.ch.dynamics.com`) | Available |

## Connect

1. Ask an agent in chat to connect Microsoft Dynamics, and give it the address
   you open Dynamics at. Any page of your environment works, for example
   `https://contoso.crm4.dynamics.com/main.aspx?...` or, for Business Central,
   `https://businesscentral.dynamics.com/<tenant>/Production?company=...`. If
   you don't know it, open Dynamics and copy the address bar, or find
   **Environment URL** in the Power Platform admin center.
2. Press **Connect Microsoft Dynamics** on the card and sign in with your
   Microsoft work account. The connection defaults to **Only me** and acts
   with your own Dynamics permissions. If you may add connections for the
   workspace, you can choose **This workspace** instead to share it; everyone
   then acts with that account's Dynamics permissions.

You can also add the same address as a custom server under **Capabilities**;
Opengeni recognizes it as Microsoft Dynamics.

To approve every change before it happens, open the connection's **Tool
permissions**. Creating, updating and deleting records (and, in Business
Central, actions such as posting) ask first unless an administrator changes
that.

If sign-in or a call fails, Opengeni shows the reason from Microsoft. Most
failures are one of the administrator steps below.

## What agents can do

For Dataverse environments (Dynamics 365 Sales and other model-driven apps),
agents list and describe tables, query records with OData or FetchXML
(including totals grouped by month or stage), and create, update and delete
records. They use the environment's Web API, so you don't need to turn on
Dataverse's MCP server or allow Opengeni as an MCP client, and these calls
don't use Copilot Credits.

For Finance and Operations, agents list and describe data entities, query
records in one company or across companies (including counts), and create,
update and delete records. They use the environment's OData data entities,
so you don't need to add Opengeni to **Allowed MCP clients**, and these
calls don't use Copilot Credits.

For Business Central, one connection covers every company in the environment.
Agents list companies and entities (customers, vendors, items, sales and
purchase documents, ledger entries and more), query them with OData, create,
update and delete records, and run actions such as posting an invoice. They
use the Business Central API (v2.0), so no MCP configuration is needed in
Business Central.

## Administrator setup

On Opengeni's cloud service, the Microsoft Entra application ID is
`2b52f1a0-3c32-4103-a554-e6e3f3d483ff` ("Opengeni Dynamics"). Self-hosted
deployments use their own application; ask your operator for its ID.

### Consent in Microsoft Entra

Until Microsoft verifies Opengeni as a publisher, people outside Opengeni's
own tenant can't consent to it themselves, so the first person to sign in sees
**Need admin approval**. When they come back, the card shows a ready-made
message with the approval link to send to IT, and **Try signing in again** for
after they approve. A Global Administrator, Application Administrator or Cloud
Application Administrator grants consent for everyone once, by opening:

```
https://login.microsoftonline.com/<your-tenant-domain-or-id>/adminconsent?client_id=2b52f1a0-3c32-4103-a554-e6e3f3d483ff
```

If your tenant uses the admin consent request workflow, people can request
approval from Microsoft's screen instead; they can connect once an
administrator approves it in the Entra admin center (**Enterprise
applications** > **Admin consent requests**). See Microsoft's
[publisher verification](https://learn.microsoft.com/en-us/entra/identity-platform/publisher-verification-overview)
and [admin consent](https://learn.microsoft.com/en-us/entra/identity/enterprise-apps/grant-admin-consent)
pages.

### Dataverse

No environment setting is needed beyond consent. Each user needs a security
role in the environment and a Dynamics 365 or Power Apps licence that gives
access to the data, as for any other app.

### Business Central

No environment setting is needed beyond consent. Each user needs a Business
Central licence and permission sets in the environment that allow what they
ask for (for example **D365 BUS FULL ACCESS**), as in the web client.

If your organization consented to Opengeni before it supported Business
Central, an administrator opens the consent link above once more to add the
Business Central permission.

People sign in with an account from the environment's own Microsoft Entra
tenant. Guest or partner accounts from another tenant aren't supported yet.

### Finance and Operations

No environment setting is needed beyond consent. Opengeni reads and changes
Finance and Operations data through its data entities, which needs the
**Access Dynamics AX data** permission. If your tenant consented to Opengeni
before that permission was part of it, Finance and Operations requests fail
until an administrator grants consent again with the link above.

Each person needs a user in the environment (**System administration** >
**Users**) with security roles that give access to the data, as for any other
client.

Environments created in the Power Platform admin center use a regional
address such as `https://contoso.operations.ch.dynamics.com`; it works the
same way.

Calls run under each user's own Finance and Operations security roles. See
[data entities and OData](https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/odata).

## Licensing and billing

* Users need a licence that gives them access to the data, as for any other
  client. Dataverse Web API calls count toward your tenant's normal
  [Power Platform request limits](https://learn.microsoft.com/en-us/power-platform/admin/api-request-limits-allocations),
  Finance and Operations OData calls toward its
  [service protection limits](https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/priority-based-throttling),
  and Business Central API calls toward the environment's
  [API limits](https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/operational-limits-online).
  None of them is billed in Copilot Credits.
* Microsoft bills calls to its hosted MCP servers from non-Microsoft clients
  in Copilot Credits (see
  [Dataverse MCP billing](https://learn.microsoft.com/en-us/power-apps/maker/data-platform/data-platform-mcp#billing)
  and the [ERP MCP server](https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/copilot/copilot-mcp)).
  Opengeni doesn't use them.
* Opengeni's own usage is billed as usual.

## Troubleshooting

| Message | What to do |
| - | - |
| Your IT needs to approve Opengeni first | Copy the message for IT from the card. After they approve, choose **Try signing in again**. |
| Didn't get to finish signing in? | If you sent an approval request from Microsoft's page, wait for IT to approve it, then retry. |
| Access denied, or missing a privilege | The signed-in user's Dynamics security roles don't allow it. |
| No access to this Dynamics environment | Ask the environment's Dynamics admin to add your account with a security role. |
| No Business Central licence | Ask your Microsoft 365 admin for a Business Central licence, then try again. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.