Microsoft Dynamics 365 (CRM)
@idaria/integration-dynamics-crmdynamics
Microsoft Dynamics 365 / Dataverse connector for idaria. OAuth2 client-credentials Web API client (read-mostly). Publishes the 'dynamics.client' + 'dynamics.cache' services and contributes the read-only dynamics_query tool — accounts, contacts, leads, opportunities and any custom table. Writes (dynamics_write) are opt-in.
Setup guide
Connect Microsoft Dynamics 365 (Dataverse)
This integration talks to the Dataverse Web API using an Azure AD app registration (server-to-server, OAuth2 client-credentials). About 10 minutes in the Azure + Power Platform admin portals. You collect four values — Tenant ID, Client ID, Client Secret, Environment URL — and paste them into the fields below.
1. Register an Azure AD application
You do not need to add any API permissions in Azure AD for this. Server-to-server access to Dataverse is granted by the application user + security role in step 2 below, not by Azure AD API permissions.
2. Create the application user in Dynamics
3. Find your Environment URL
Power Platform Admin Center →
Environments → your environment → the Environment URL on the
detail page, e.g. https://contoso.crm4.dynamics.com. The crmN segment
encodes your region (e.g. crm4 = Europe, crm = North America).
4. Fill in the fields below
| Field | Value |
|---|---|
| Token URL | OAuth 2.0 token endpoint (v2) — step 1.2 |
| Base URL | Environment URL — step 3 (…/api/data/v9.2 optional) |
| Client ID | Application (client) ID — step 1.2 |
| Client Secret | The secret Value — step 1.3 |
| Scope | Environment URL + /.default |
| Grant type | client_credentials (default) |
Install — the connection is verified in the background with a WhoAmI
call (watch the plugin logs for connected or a WhoAmI failed warning).
Troubleshooting
Least privilege: scope the security role to exactly the tables and verbs you need. Leave Enable writes off unless the assistant should create/update records.
Setup fields
The operator fills these in when installing the plugin.
- dynamics_token_urlToken URLFull OAuth2 token endpoint, e.g. https://login.microsoftonline.com/<tenant>/oauth2/v2.0/token. From Azure AD → App registration → Overview → Endpoints → 'OAuth 2.0 token endpoint (v2)'. Maps to DYNAMICS_TOKEN_URL.
- dynamics_base_urlBase URL (Web API)Dataverse Web API base — either the environment root (https://contoso.crm4.dynamics.com) or the full API base (.../api/data/v9.2). If /api/data/ is missing, /api/data/v9.2 is appended. Maps to DYNAMICS_BASE_URL.
- dynamics_client_idClient ID (Application ID)Application (client) ID of the Azure AD app registration. Maps to DYNAMICS_CLIENT_ID.
- dynamics_client_secretClient SecretThe client secret VALUE (Certificates & secrets → New client secret). Stored encrypted in the vault and shown only once. Maps to DYNAMICS_CLIENT_SECRET.
- dynamics_scopeScopeOAuth2 scope — the environment URL plus /.default, e.g. https://contoso.crm4.dynamics.com/.default. Maps to DYNAMICS_SCOPE.
- dynamics_grant_typeGrant typeOAuth2 grant type. Default client_credentials. Maps to DYNAMICS_GRANT_TYPE.
Show all 9 setup fields
- dynamics_max_bytesMax response size (bytes)Caps a single Dataverse response to prevent memory blow-ups on large reads. Default 1048576 (1 MiB).
- dynamics_cache_ttl_secondsRead cache TTL (seconds)How long identical read queries are cached in-process. Writes always bypass + clear the cache. Default 60.
- enable_writesEnable writesWhen ON, also registers the `dynamics_write` tool so the assistant can create/update records (delete is never exposed). Requires the application user to have write permission. Default OFF (read-only).
Permissions
This is everything the plugin is allowed to access once it is installed.
- memory
- none
- none
- graph
- none
- none
- network
- login.microsoftonline.comlogin.microsoftonline.uslogin.partner.microsoftonline.cnglobaldisco.crm.dynamics.com*.crm.dynamics.com*.crm2.dynamics.com*.crm3.dynamics.com*.crm4.dynamics.com*.crm5.dynamics.com*.crm6.dynamics.com*.crm7.dynamics.com*.crm8.dynamics.com*.crm9.dynamics.com*.crm11.dynamics.com*.crm12.dynamics.com*.crm14.dynamics.com*.crm15.dynamics.com*.crm16.dynamics.com*.crm17.dynamics.com*.crm19.dynamics.com*.crm20.dynamics.com
- filesystem
- no
Versions
| Version | Core | Size | Published | sha256 | Download |
|---|---|---|---|---|---|
| v0.4.0 | >=1.78.0 <2.0 | 24.4 KB | 30 Nov 2026 | a979d199f3d2… | .zip |