DBSync Dynamics 365 Authentication Error – Token Validation Failed | ODATAV4Adapter Unexpected EOF i

1. Summary / Introduction

This article describes how to identify and troubleshoot synchronization failures in DBSync caused by authentication issues with the Microsoft Dynamics 365 connector. In these scenarios, the Dynamics 365 connection becomes unauthenticated or disconnected, preventing DBSync from obtaining a valid access token.

When this occurs, all workflow tasks that use the Dynamics 365 connector fail during execution. Logs typically contain authentication-related errors such as Token Validation Failed, Invalid Response, or ODATAV4Adapter Unexpected EOF in Prolog. These errors indicate that the connector cannot successfully authenticate with the Dynamics 365 API.

This article helps distinguish authentication-related failures from other Dynamics 365 errors and provides steps to verify and restore the connector authentication.

The following errors may appear in the logs:

Dynamics365CRM Token Validation failed

ODATAV4Adapter Unexpected EOF in prolog

QueryCommandAction Failed to process query action: Check Connector Property: Invalid Response

2. Problem / Issue

During a scheduled or manual synchronization, DBSync workflows may fail when executing tasks that use the Microsoft Dynamics 365 connector. The failure typically occurs at the step where the workflow attempts to query, transform, or write data using the Dynamics 365 connection.

When this issue occurs, the workflow stops processing and the execution logs display authentication-related errors similar to the following:

Dynamics365CRM Token Validation failed

ODATAV4Adapter Unexpected EOF in prolog

QueryCommandAction Failed to process query action: Check Connector Property: Invalid Response

These errors indicate that the workflow cannot successfully communicate with the Dynamics 365 API through the configured connector.

3. Environment / Applies To

Product: DBSync Cloud Workflow Connector: Microsoft Dynamics 365 CRM (OData V4) Versions: All supported DBSync versions using the Dynamics 365 connector Environment: Cloud or On-Premise DBSync deployments

4. Symptoms

Users may observe the following behavior:

  • Workflow executions fail when reaching tasks that use the Microsoft Dynamics 365 connector

  • Query tasks retrieving data from Dynamics 365 fail

  • Transform or Write tasks targeting Dynamics 365 do not execute

  • Workflows that depend on Dynamics 365 stop processing records

  • Execution logs contain authentication or response errors related to the Dynamics 365 connector

5. Root Cause

This issue occurs when DBSync cannot successfully authenticate with the Microsoft Dynamics 365 API. This typically happens when the authentication token associated with the Dynamics 365 connector becomes invalid, expired, or disconnected.

When authentication fails, DBSync cannot obtain a valid access token to communicate with the Dynamics 365 service. As a result, API requests may return unexpected responses such as an empty response, an HTML error page, or another non-OData payload.

Because the ODATAV4Adapter expects a valid OData response, it cannot parse these responses and throws the error:

Unexpected EOF in prolog

When this occurs, the query task fails and the workflow execution stops.

6. Solution / Resolution

Follow the steps below to resolve the issue.

  • Identify the Dynamics 365 Connector Used by the Workflow

    • Log in to the DBSync application.

    • From the main dashboard, navigate to Connections.

    • Locate the Microsoft Dynamics 365 connector used by the workflow that is failing.

    • If only one Dynamics 365 connector exists, select that connector.

    • If multiple Dynamics 365 connectors are configured, review the failing workflow and identify which connector is used in the step that is generating the errors listed in this article.

  • Open the Connector Configuration

    • Click the identified Dynamics 365 connector.

    • Open the connector configuration settings.

  • Verify Connector Configuration Values Confirm that the following values are correctly configured:

    • Dynamics Environment URL

      • Example: https://orgname.crm.dynamics.com This URL corresponds to the Dynamics 365 organization environment.

    • Tenant ID

      • Must match the Azure Active Directory tenant associated with the Dynamics 365 environment.

    • Client ID

      • Must match the Azure App Registration configured for the integration.

  • Update any incorrect values if necessary.

  • Test the Connection

    • Click Save to apply any configuration updates.

    • Select Test Connection.

    • Successful Connection: A green confirmation message appears indicating that the connection is successful.

    • Connection Failure: An error message will appear indicating the reason for the failure.

  • Reauthenticate the Connector (if required)

    • If the connection test fails due to authentication issues:

      • Reauthorize the connector within the configuration page.

      • Complete the authentication process to refresh the OAuth token.

      • Save the connector configuration.

      • Run Test Connection again to confirm the connection is successful.

  • Rerun the Workflow

    • After the connector connection is successfully validated:

      • Navigate to the workflow that previously failed.

      • Trigger the workflow execution again.

      • Confirm that the Dynamics 365 tasks execute without authentication errors.

If the connection test cannot be successfully completed after verifying the configuration, refer to the Additional Troubleshooting section or contact DBSync Support.

8. Impact

When this issue occurs:

  • Workflow tasks that use the Microsoft Dynamics 365 connector fail during execution

  • Data cannot be retrieved from or written to Dynamics 365

  • Workflows that depend on Dynamics 365 data stop processing

  • Downstream integration tasks do not execute because the workflow stops at the failed step

9. Keywords / Tags

DBSync, Dynamics 365, Dynamics CRM, Token Validation Failed, ODATAV4Adapter, Unexpected EOF in Prolog, Invalid Response, OData V4 Adapter Error, Dynamics 365 Authentication Error, DBSync Dynamics Connector Error

Last updated