Muokkaa

Jaa


Troubleshoot the Salesforce and Salesforce Service Cloud connectors in Azure Data Factory and Azure Synapse

APPLIES TO: Azure Data Factory Azure Synapse Analytics

Tip

Try out Data Factory in Microsoft Fabric, an all-in-one analytics solution for enterprises. Microsoft Fabric covers everything from data movement to data science, real-time analytics, business intelligence, and reporting. Learn how to start a new trial for free!

This article provides suggestions to troubleshoot common problems with the Salesforce and Salesforce Service Cloud connectors in Azure Data Factory and Azure Synapse.

Error code: SalesforceOauth2ClientCredentialFailure

  • Cause: You encounter this error code as you don't complete the Salesforce Connected App configuration.

  • Recommendation:
    To configure your Salesforce Connected App, follow these steps:

    1. Create your connected app, and complete its basic information and OAuth settings for the connected app.

      1. Configure the Connected App Name, API Name and Contact Email.
      2. Select Enable OAuth Settings.
      3. Callback url can be random as Client Credential Flow don't need callback, for example: https://login.salesforce.com/services/oauth2/callback
      4. Setup OAuth access token scope, it's better to set up "Full access" for Azure Data Factory in case of permission issue.
        If you want to keep the mini scope, at least the "Manage user data via APIs (api)" should be added.
        If you don't set proper scope, you may get following similar message like: Unauthorized, This session is not valid for use with the REST API
      5. Select Enable Client Credentials Flow.

      Screenshot of configuring basic information for the Salesforce connector app.

    2. Get Client ID and Secret through Manage Consumer Details.

      Screenshot of the manage consumer details.

    3. Copy the client ID and secret to a txt file for Azure Data Factory linked service.

      Screenshot of the Client ID and Secret.

    4. Create a user who has the API Only User permission.

      1. Set up a permission set which only has API only permission. Screenshot of setting system permissions.
      2. Specify the API Enabled and Api Only User. Screenshot of the system permissions.
    5. Create a new user and link the permission set in the user detail page: Permission Set Assignments. Screenshot of the permission set assignments.

    6. From the connected app detail page, click Manage, click Edit Policies. For Run As, select an execution user who has the API Only User permission. For Timeout Value, you can select a proper value or remain default None.

      Screenshot of the connected app detail.

      Screenshot of the edit policies.

For more troubleshooting help, try these resources: