Skip to main content

Dynamics 365 Adapter

A Source Custom node that polls Microsoft Dynamics 365 CRM on an interval, using a FetchXML query, and pushes each record downstream.

Part of the Linkiir Adapters package — see requesting the package.

What it does

On each interval the node signs in to Azure AD with the configured account, runs your FetchXML query against the Dynamics Web API, and pushes the records it returns. The entity named in the query determines what is queried, so changing what you pull is a query edit, not a code change.

Dynamics 365 CRM → Dynamics CRM Adapter → your next node

Before you start

Collect from your Dynamics 365 environment:

  • The base URL of the instance, for example https://yourorg.crm.dynamics.com/.
  • A username and password for an Azure AD account with access to that instance.
  • A FetchXML query describing the records you want.

The account signs in with the Azure AD resource owner password grant, so it must be a plain account: multi-factor authentication and conditional access policies that require interaction will block it. Use a dedicated service account with only the CRM access it needs.

Set it up

  1. Open the Dynamics CRM Adapter node in the Workflow Builder and click Edit.

  2. Fill in the connection fields:

    FieldValue
    URLThe Dynamics instance base URL. The Web API path is appended to it
    UsernameThe Azure AD account
    PasswordThat account's password
  3. Put your query in FetchXML Query. To pull records dated today, use the {{curr_date}} token where the date belongs — the node substitutes it in YYYY-MM-DD form on each poll.

  4. Set Live Mode off, then Save.

  5. Connect a downstream node and start the workflow. Sign-in still happens, so this pass proves the account works.

  6. Turn Live Mode on. The log reports how many records were pushed.

Configuration reference

FieldTypeDefaultPurpose
Intervalnumber60000Milliseconds between polls
URLstring(empty)Base URL of the Dynamics 365 instance. The Web API path is appended to it
Usernamestring(empty)Azure AD username
Passwordpassword(empty)Azure AD password
FetchXML Querystring(template)The query to run. {{curr_date}} is replaced with today's date. The entity in the query decides what is queried
Live ModebooltrueOff simulates the requests. Sign-in is always live
Verify TLSbooltrueVerify the server's TLS certificate. Turn off only for a local test proxy

Verify it worked

  • With Live Mode off, the node starts clean and logs that no request was sent.
  • With Live Mode on, the log reports a count of pushed records.
  • Change the entity in FetchXML Query, restart the node, and the count changes accordingly.

If it didn't work

Symptom in the logCauseFix
CONFIG_ERROR naming a fieldURL, Username, or Password is emptyFill the field named
AUTH_FAILED mentioning interaction or MFAThe account requires interactive sign-inUse a service account without MFA or a blocking conditional access policy
AUTH_FAILED on correct credentialsThe account has no access to the Dynamics instanceGrant it access in Dynamics
HTTP_400 mentioning the queryThe FetchXML is malformed, or names an entity or attribute that does not existTest the query in Dynamics first, then paste it in
HTTP_404URL is wrong for the instanceCorrect the base URL
failed to decrypt fieldThe project was imported to a different installationRe-enter Password on this installation
Live Mode is off and nothing is pushedWorking as configuredTurn Live Mode on
No error, but nothing pushedThe query matched no recordsWiden the query, or check {{curr_date}} is the date you expect

Next