How to connect salesforce from azure data factory using OAUTH2

Madhavan Alagesan 11 Reputation points
2023-05-19T14:21:48.1333333+00:00

How to connect salesforce from azure data factory using OAUTH2

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

2 answers

Sort by: Most helpful
  1. QuantumCache 20,366 Reputation points Moderator
    2023-05-26T03:46:51.9+00:00

    Hello @Madhavan Alagesan,

    It looks like you are trying to use the Salesforce Connection credentials to pull object data(OAuth Flow). I hope this helps with your initial query!
    User's image

    You might have already created the Salesforce Connected APP!

    User's image

    You might have already tested the Access_Token via Postman! User's image

    Use the Access_Token to get the Salesforce Object:

    User's image

    The above 2 steps can be executed in ADF using the WebActivity, which i have shown in the below section.

    ADF: Linked Service which uses in-built Salesforce Connector!

    User's image

    Copy Data Activity:

    Source: Use Salesforce Linked Service to Connect and get the Source DataSet

    Source

    User's image

    Sink
    User's image

    Mapping:

    User's image

    Below ADF Pipeline Shows the implementation and usage of oAuth2 with Salesforce in 2 ways:

    1. Web Activity-->GetToken--Web Activity-->GetEmployeeDetails-->Do the Mapping from the Json to SINK dataset.
    2. CopyData Activity-->Use Salesforce Linked Services--Use UserName+Password+Consumer Key+Secret+SecurityToken--Mapping Source&Sink

    User's image

    If the response is helpful, please click "Accept Answer" and upvote it. So that we can close this thread.

    1 person found this answer helpful.

  2. Dillon Silzer 57,826 Reputation points Volunteer Moderator
    2023-05-20T16:30:01.3133333+00:00

    Hello Madhavan,

    As far as I know OAUTH is not supported in Azure Data Factory.

    You will need to authenticate with a username/password to salesforce:

    Copy data from and to Salesforce using Azure Data Factory or Azure Synapse Analytics

    https://learn.microsoft.com/en-us/azure/data-factory/connector-salesforce?tabs=data-factory#linked-service-properties


    If this is helpful please accept answer.


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.