0
votes

We've built a data migration package that migrates data from a legacy Access database in to a CRM online instance. Our client has a quite complex authentication platform built around this, so we have had to use the Client ID and Client Secret method of authenticating to their CRM.

The data integration runs fine for the first hour but we then suddenly run in to the following errors. From what we can see, it seems like the authentication token has expired and Kingswaysoft is not automatically refreshing it. Please note that we are not receiving timeouts on individual actions - the whole job will stop after an hour due to timeouts.

[Data Flow Task #1] Warning: An exception has occurred while processing the service request, the same request will be attempted again after 60 seconds. KingswaySoft.IntegrationToolkit.DynamicsCrm.CrmServiceException: CRM service call returned an error: The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Bearer authorization_uri=https://login.microsoftonline.com/db630ef6-1667-4b9b-b52e-341a723742d7/oauth2/authorize, resource_id=https://myorg.crm6.dynamics.com/'.

We've inspected the packets being sent via the integration using fiddler, and we can confirm that a new authentication request is being made to the Microsoft servers and a new token is returned as part of that request, however the requests to the CRM are still using the old token.

The authentication requests happen immediately before every failed request, so it seems Kingswaysoft has identified it needs to re authenticate, but it is not using the new token that is being returned.

Is there anything we can do on our end to get around this or is this a bug/known issue with the Dynamics connector for Kingswaysoft when using the Client ID/ Client Secret method of authenticating?

1

1 Answers

2
votes

We have identified the source of the issue (it was a tricky one). If you are experiencing the issue, please make sure that you are on the latest release of our software (we initially fixed the issue in a temporary build that we made available privately on April 2, 2019 - the changes are now in our official build).