App Registration

Note: The user Should have app registration privileges. 

1. Go to App Registrations click on New Registration, and give name redirect URL is optional. click on Register.


2. Note down the ClientID and tenant ID from the next screen or by clicking overview of the app.

3. Click on Certificates& Secrets create New Client Secret then save the value, it won't be available to view later.


4. We need to give the Data Factory Contributor role to this application in resource group which is used to create ADF.

5. To generate an access token we need the below information from the above application.

  tenant_id

  client_id

  client_secret

6. using the below rest API call we can get an access token

  

Request Type: POST

URL: https://login.microsoftonline.com/{{tenant_id}}/oauth2/token

Request Body:

grant_type : client_credentials

client_id : {{client id}}

client_secret: {{client secret}}

resource: https://management.azure.com/


7. Using the below rest call we can execute the ADF pipeline using the access token we received from the above call

We have to replace {{sub_id}} with subscription id,{{resource_group_name}}  with resource group name,{{factory_name}}  with ADF name,{{pipeline_name}}  with  pipeline name

Request Type: POST

URL: https://management.azure.com/subscriptions/{{sub_id}}/resourceGroups/{{resource_group_name}}/providers/Microsoft.DataFactory/factories/{{factory_name}}/pipelines/{{pipeline_name}}/createRun?api-version=2018-06-01

Authorization Bearer Token:

Access_token from authentication response