Salesforce V2 Link Service doens't work. error message: a task was canceled Source=mscorlib

ChoiLiamhehimhis-5365 25 Reputation points

I am migrating the ADF salesforce connector to the new V2 connector and now testing it.

When testing the connection for the link service, it is good.

However, it failed in the copy activity. with message:

Failure happened on 'Source' side. 'Type=System.Threading.Tasks.TaskCanceledException,Message=A task was canceled.,Source=mscorlib,'

Sometimes it works, and sometimes it fails.

I also enable the debug run in salesforce, it shows the query is with status 'completed'. But the SHIR doesn't receive any records from the source and the copy activity is failed.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,882 questions
{count} votes

1 answer

Sort by: Most helpful
  1. BhargavaGunnam-MSFT 28,106 Reputation points Microsoft Employee

    Hello Choi, Liam (he/him/his),

    Thanks for the additonal details.

    The new salesforce connector leverages bulk API for better user experience. But recently we did find there are some bugs when using SalesforceV2 connector comapring with legacy Salesforce connector.

    Please use Power Shell command to generate legacy Salesforce linked service and pipelines.

    The salesforce related definiation can be found here.


    You can use UX feature flag '&feature.enableSalesforceV2=false' to temporarily switch back to legacy salesforce connector to unblock you here. In order to use the feature flag, just add above in data factory URL.

    If the new created linked service is with type 'Salesforce' rather than 'SalesforceV2', then it works.

    Please try this and let me know if you still having the issue.