How to call a REST API using Azure Data Factory Pipelines?

14,483

You could call the REST API with a Web activity in the pipeline, select the Authentication with MSI in the web activity.

enter image description here

Navigate to your subscription or ADFv2 in the portal -> Access control (IAM) -> Add -> Add role assignment -> search for the name of your ADFv2 and add it as an Owner/Contributor role in the subscription. Then the MSI of your ADFv2 will be able to call the rest api.

For exampple, my ADFv2 named joyfactory, just add the MSI with the same name as an Owner or Contributor.

enter image description here

After adding it, check it in the Role assignments , it should be like below.

enter image description here

For more details, check this similar issue.

Share:
14,483
Binu V Pillai
Author by

Binu V Pillai

Updated on July 11, 2022

Comments

  • Binu V Pillai
    Binu V Pillai almost 2 years

    I would like to execute a REST API with oauth authentication using ADF Pipeline. Without oauth2, I could call any REST APIs. So here my question is, does this ADF pipeline support REST APis with oauth2 authentication ? if yes. Please provide a solution

    The API which is am trying, you can find from this URL https://docs.microsoft.com/en-us/rest/api/datafactory/pipelineruns/querybyfactory

    Thanks
    Binu