|
| 1 | +--- |
| 2 | +title: Troubleshoot the Salesforce and Salesforce Service Cloud connectors |
| 3 | +titleSuffix: Azure Data Factory & Azure Synapse |
| 4 | +description: Learn how to troubleshoot issues with the Salesforce and Salesforce Service Cloud connectors in Azure Data Factory and Azure Synapse Analytics. |
| 5 | +author: jianleishen |
| 6 | +ms.service: data-factory |
| 7 | +ms.subservice: data-movement |
| 8 | +ms.topic: troubleshooting |
| 9 | +ms.date: 03/04/2024 |
| 10 | +ms.author: jianleishen |
| 11 | +ms.custom: has-adal-ref, synapse |
| 12 | +--- |
| 13 | + |
| 14 | +# Troubleshoot the Salesforce and Salesforce Service Cloud connectors in Azure Data Factory and Azure Synapse |
| 15 | + |
| 16 | +[!INCLUDE[appliesto-adf-asa-md](includes/appliesto-adf-asa-md.md)] |
| 17 | + |
| 18 | +This article provides suggestions to troubleshoot common problems with the Salesforce and Salesforce Service Cloud connectors in Azure Data Factory and Azure Synapse. |
| 19 | + |
| 20 | +## Error code: SalesforceOauth2ClientCredentialFailure |
| 21 | + |
| 22 | +- **Cause**: You encounter this error code as you don't complete the Salesforce Connected App configuration. |
| 23 | + |
| 24 | +- **Recommendation**: <br/>To configure your Salesforce Connected App, follow these steps: |
| 25 | + 1. Create your connected app, and complete its [basic information](https://help.salesforce.com/s/articleView?id=sf.connected_app_create_basics.htm&type=5) and [OAuth settings](https://help.salesforce.com/s/articleView?id=sf.connected_app_create_api_integration.htm&type=5) for the connected app. |
| 26 | + 1. Configure the **Connected App Name**, **API Name** and **Contact Email**. |
| 27 | + 1. Select **Enable OAuth Settings**. |
| 28 | + 1. Callback url can be random as Client Credential Flow don't need callback, for example: `https://login.salesforce.com/services/oauth2/callback` |
| 29 | + 1. Setup OAuth access token scope, it's better to set up "**Full access**" for Azure Data Factory in case of permission issue. |
| 30 | + <br/>If you want to keep the mini scope, at least the "**Manage user data via APIs (api)**" should be added. |
| 31 | + <br/>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** |
| 32 | + 1. Select **Enable Client Credentials Flow**. |
| 33 | + |
| 34 | + :::image type="content" source="media/connector-salesforce/configure-basic-information.png" alt-text="Screenshot of configuring basic information for the Salesforce connector app."::: |
| 35 | + |
| 36 | + 1. Get Client ID and Secret through **Manage Consumer Details**. |
| 37 | + |
| 38 | + :::image type="content" source="media/connector-salesforce/manage-consumer-details.png" alt-text="Screenshot of the manage consumer details."::: |
| 39 | + |
| 40 | + 1. Copy the client ID and secret to a txt file for Azure Data Factory linked service. |
| 41 | + |
| 42 | + :::image type="content" source="media/connector-salesforce/client-id-secret.png" alt-text="Screenshot of the Client ID and Secret."::: |
| 43 | + |
| 44 | + 1. Create a user who has the API Only User permission. |
| 45 | + |
| 46 | + 1. Set up a permission set which only has API only permission. |
| 47 | + :::image type="content" source="media/connector-salesforce/set-up-a-permission.png" alt-text="Screenshot of setting system permissions."::: |
| 48 | + 1. Specify the **API Enabled** and **Api Only User**. |
| 49 | + :::image type="content" source="media/connector-salesforce/system-permissions.png" alt-text="Screenshot of the system permissions."::: |
| 50 | + |
| 51 | + 1. Create a new user and link the permission set in the user detail page: **Permission Set Assignments**. |
| 52 | + :::image type="content" source="media/connector-salesforce/permission-set-assignments.png" alt-text="Screenshot of the permission set assignments."::: |
| 53 | + |
| 54 | + 1. 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. |
| 55 | + |
| 56 | + :::image type="content" source="media/connector-salesforce/connected-app-detail.png" alt-text="Screenshot of the connected app detail."::: |
| 57 | + |
| 58 | + :::image type="content" source="media/connector-salesforce/edit-policies.png" alt-text="Screenshot of the edit policies."::: |
| 59 | + |
| 60 | +## Related content |
| 61 | + |
| 62 | +For more troubleshooting help, try these resources: |
| 63 | + |
| 64 | +- [Connector troubleshooting guide](connector-troubleshoot-guide.md) |
| 65 | +- [Data Factory blog](https://techcommunity.microsoft.com/t5/azure-data-factory-blog/bg-p/AzureDataFactoryBlog) |
| 66 | +- [Data Factory feature requests](/answers/topics/azure-data-factory.html) |
| 67 | +- [Azure videos](https://azure.microsoft.com/resources/videos/index/?sort=newest&services=data-factory) |
| 68 | +- [Microsoft Q&A page](/answers/topics/azure-data-factory.html) |
| 69 | +- [Stack Overflow forum for Data Factory](https://stackoverflow.com/questions/tagged/azure-data-factory) |
| 70 | +- [Twitter information about Data Factory](https://twitter.com/hashtag/DataFactory) |
0 commit comments