Dynamics CRM: 500 Errors While Authenticating an Element Instance

When authenticating an element instance of Microsoft Dynamics CRM, you might receive this error:

"response_status": 500
"message": "Unable to get change token"

Multiple problems can cause authentication to fail with this response message, but two of the most common reasons for this error are the MS Dynamics tenant URL or the poller configuration.

Tenant URL

The tenant URL of the MS Dynamics account might not be accessible. Confirm that the URL can be accessed directly through a browser to determine if there is an account or server issue at play before proceeding.

Poller Configuration

If the element instance is configured for polling events, then the poller configuration could be the reason. Different versions of Dynamics CRM support different queries in the poller configurations. If you attempt to use the wrong poller configuration, then you will experience authentication errors.

The main difference to be aware of is that version 2015 of Dynamics CRM requires a different poller configuration because the fetchChanges polling query is valid only for Dynamics CRM version 2016. So when authenticating element instances for customers that have Dynamics 2015 and earlier, you must instead reference the modifiedon field in the poller url.

If you experience this error with a more recent Dynamics CRM version, we recommended that you still try the modifiedon version poller configuration URL before looking for other potential causes of this error because this query works for both versions.

For example the two main event.poller.configuration URLs for polling contacts are:

Version 2015 and earlier: /hubs/crm/contacts?where=modifiedon >'${gmtDate:yyyy-MM-dd'T'HH:mm:ss'Z'}'