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

故事扮演 提交于 2020-06-25 06:41:26

问题


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


回答1:


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

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.

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

For more details, check this similar issue.



来源:https://stackoverflow.com/questions/58956627/how-to-call-a-rest-api-using-azure-data-factory-pipelines

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!