Dynamics CRM integration

Please share on how do we connect to Dynamic CRM system from Camunda?
Any out of box Dataverse connectors available for D365 integration?

Thanks in advance

What do you want to do with it? Can you describe the use-case of the integration?

Short answer is: write a service worker. To make it more reusable, write a connector.

Josh

Hi @Dhana_Lakshmi ,

Camunda 8 doesn’t have an out-of-the-box connector specifically for Microsoft Dynamics 365 / Dataverse, but you can absolutely integrate with it using a couple of solid approaches:

1. Use the REST API of Dataverse (Dynamics 365)

Dynamics exposes a comprehensive Web API (based on OData v4). You can call it from:

  • Custom External Java Worker — if you’re already writing Java workers, this is ideal.
  • Camunda 8 Connector (HTTP) — use the generic HTTP connector to hit the API.

Example (HTTP Connector):

{
  "method": "GET",
   "url": "https://<org>.crm.dynamics.com/api/data/v9.2/accounts",
   "headers": {
      "Authorization": "Bearer <access_token>"
   }
}

You’ll need to handle OAuth2 authentication (more below).

2. Handle Microsoft Authentication (OAuth2)

You’ll need to get a Bearer token from Azure AD for any API calls.

Typical flow:

  • Register an App Registration in Azure.
  • Use Client Credentials flow (for server-to-server integration).
  • Request token from:

POST https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token

Then use the token in your connector or Java worker.

3. Optional: Build a Custom Connector

If you use Dataverse frequently, you can build a custom Camunda 8 connector that wraps the auth + calls.

Camunda provides a guide here:

Creating Custom Connectors – Camunda Docs

Approach Effort Best For
HTTP Connector + Manual OAuth Low One-off API calls
External Java Worker Medium Reusable logic with better control
Custom Connector High Frequent or complex Dataverse integrations

Here’s how you can connect to Microsoft Dynamics 365 / Dataverse from Camunda 8 using the HTTP Connector, including the OAuth2 token acquisition process.

Step-by-Step Integration (Camunda 8 HTTP Connector + OAuth2)

1. Register an App in Azure

Go to Azure Portal → Azure Active Directory → App registrations:
• Redirect URI: Not needed for client credentials flow.
• API permissions: Add Dynamics CRM → user_impersonation
• Certificates & secrets: Generate a client secret

Save:
• client_id
• client_secret
• tenant_id

2. Get an Access Token (via External Worker or Script Task)

Send a POST request to:

POST https://login.microsoftonline.com/<tenant_id>/oauth2/v2.0/token

Headers:

Content-Type: application/x-www-form-urlencoded

Body (form-url-encoded):

grant_type=client_credentials
client_id=<client_id>
client_secret=<client_secret>
scope=https://<your-org>.crm.dynamics.com/.default

Response:

{
  "access_token": "eyJ0eXAiOiJKV1QiLCJh..."
}

3. Use HTTP Connector to Call Dataverse API

With the token, use the Camunda 8 HTTP Connector:

{
  "type": "io.camunda:http-json",
  "inputs": {
    "url": "https://<your-org>.crm.dynamics.com/api/data/v9.2/accounts",
    "method": "GET",
    "headers": {
      "Authorization": "Bearer ${access_token}",
      "Accept": "application/json"
    }
  },
  "resultVariable": "crmResponse"
}

If you’re using a Script Task or external worker, just make sure the token is fetched first and passed in as a variable.

Optional: Automate OAuth and Call in a Java Worker

Instead of managing tokens inside BPMN, a cleaner approach is a Java worker that:
1. Fetches the access token
2. Makes the API call
3. Returns data to the process

i used external task workers to pull and push data through the crm rest api, keep things simple with custom headers for auth, and used variables to pass data between tasks