Authorization Code Flow (3-legged OAuth) – Connect to Azure Data factory

Prashant Chauda 1 Reputation point
2021-06-16T03:47:45.35+00:00

I have registered the LinkedIn API in LinkedIn developer portal and able to generate the ClientID/ Client Secret and also able to generate the code while using the redirect link in web (https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=xxxxxxx&scope=r_liteprofile&state=123456&redirect_uri=https://xxxxx.com/) and also able to generate the access token (POST- https://www.linkedin.com/oauth/v2/accessToken) by using the postman but could not able to understand how this can be done in Azure data factory , I can understand we have the REST API which can retrieve the token and copy the data in ADLS Gen2 but how we can get the code in Azure data factory (without authorization consent)

  1. Configure your application in the Developer Portal to obtain Client ID and Client Secret. – This has been done
  2. Your application directs the browser to LinkedIn's OAuth 2.0 authorization page where the member authenticates. – how this can be handled in ADF
  3. After authentication, LinkedIn's authorization server passes an authorization code to your application. – how this can be handled in ADF
  4. Your application sends this code to LinkedIn and LinkedIn returns an access token. – This can be done
  5. Your application uses this token to make API calls on behalf of the member. – This can be done

As I can understand we need to follow above 5 step and some of steps I can able to manage it.

It would be great help if someone guide me, Thanks in advance.

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

1 answer

Sort by: Most helpful
  1. HimanshuSinha-msft 19,486 Reputation points Microsoft Employee Moderator
    2021-06-16T17:56:12.517+00:00

    Hello @Prashant Chauda ,
    Thanks for the ask and using the Microsoft Q&A platform .

    Reading more here , i see that the worfklow for 3-legged- OAuth does need manual intervention and so does not work in ADF / automatioin scenario . , please read here .

    I think you will have to take the 2-legged approach ( I have not tried this for linkedin API , but then this is very normal approach which I have seen across many other services )

    Please do let me know how it goes .
    Thanks
    Himanshu
    Please do consider clicking on "Accept Answer" and "Up-vote" on the post that helps you, as it can be beneficial to other community members


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.