Home > Blockchain >  Error getting authentication to Azure data factory
Error getting authentication to Azure data factory

Time:12-17

I need to hit the data factory pipeline with the REST call ... So, I

  1. Registered application in the Azure Active Directory.
  2. Obtained Client_ID and client_Secret

Then I try to use Postman to get the authentication token and get an error, which I do not understand. Please, help. How can I get authentication token to my ADF using Postman ?

enter image description here

CodePudding user response:

In body section, instead of raw, use - x-www-form-urlencoded as below and it should help resolve the issue.

enter image description here

Ideally, when you select x-www-form-urlencoded radio button in the Body section, it automatically sets the Content-Type=application/x-www-form-urlencoded under the Headers tab as shown below.

enter image description here

CodePudding user response:

Please follow below steps for generating bearer token In ADF :

Step 1: Create a web activity to get the Access Token from ADF.

URL: https://login.microsoftonline.com/<Tenant ID>/oauth2/token

enter image description here

  • Method : POST

  • Body: grant_type=client_credentials&client_id=<client_id>&client_secret=<client_secret>&resource=https://management.azure.com/

  • Header: Content-Type:application/x-www-form-urlencoded

enter image description here

Step2: Create Set variable :

  • Add dynamic content -> @activity('Web1').output.access_token

enter image description here

Pipeline successfully executed and got the token

enter image description here

  • Related