Unable to create new linked service for salesforce. As it changed from username password to Client ID and Client secret

Manikanta Naluvala 20 Reputation points
2024-01-23T17:50:05.8433333+00:00

Unable to establish connection to the Salesforce environment using provided client id and client secret, please verify the details. Error message: {"error":"invalid_grant","error_description":"no client credentials user enabled"}

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,625 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. PRADEEPCHEEKATLA 90,641 Reputation points Moderator
    2024-01-24T05:27:25.1666667+00:00

    @Manikanta Naluvala - Thanks for the question and using MS Q&A platform.

    It seems like you are having trouble creating a new linked service for Salesforce in Azure Data Factory. I understand that Salesforce has changed its authentication method from username and password to client ID and client secret. The error message you received indicates that there is an issue with the client credentials you provided.

    To resolve this issue, please follow the steps below:

    • Make sure that you have created a connected app in Salesforce and obtained the client ID and client secret. If you have not done so, please follow the instructions in this Salesforce documentation to create a connected app.

    enter image description here

    • In Azure Data Factory, create a new linked service for Salesforce.
    • Configure the service details, test the connection, and create the new linked service.Enter the client ID and client secret that you obtained from Salesforce in the corresponding fields and save the linked service and test the connection.

    Screenshot of linked service configuration for Salesforce.

    • The following properties are supported for the Salesforce linked service.

    enter image description here

    For more details, refer to Copy data from and to Salesforce using Azure Data Factory or Azure Synapse Analytics.

    If you are still unable to establish a connection, please double-check that the client ID and client secret are correct and that the connected app has the necessary permissions to access the Salesforce environment. If you continue to experience issues, please let me know and I will do my best to assist you further.

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


  2. Naash 0 Reputation points
    2024-02-02T11:14:01.92+00:00

    I believe this issue is related to the use of "OAuth 2.0 Username-Password" in salesforce backend, if we move it to "OAuth 2.0 Client Credentials". That should solve the issue. Kindly reach out to relevant salesforce teams in your org.

    0 comments No comments

  3. JJ Lucarelli 26 Reputation points
    2024-06-07T13:14:51.69+00:00

    Be sure to assign a user to the correct "Run As" field on the connected app in Salesforce. My issue was that I added the user to the first "Run As" field I saw and it was for Custom Connected App Handler when it is supposed to be the one for Client Credentials Flow. :-)

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.