如何使用Azure数据工厂管道调用REST API? [英] How to call a REST API using Azure Data Factory Pipelines?

查看:189
本文介绍了如何使用Azure数据工厂管道调用REST API?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用ADF Pipeline通过oauth身份验证执行REST API.没有oauth2,我可以调用任何REST API.所以这里我的问题是,此ADF管道是否支持具有oauth2身份验证的REST APis?如是.请提供解决方案

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

正在尝试的API,您可以从此URL中找到 https://docs.microsoft.com/zh-cn/rest/api/datafactory/pipelineruns/querybyfactory

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

谢谢
比努

推荐答案

您可以使用

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

在门户中导航到您的订阅或ADFv2-> Access control (IAM)-> Add-> Add role assignment->搜索ADFv2的名称,并将其添加为订阅中的Owner/Contributor角色.然后,您的ADFv2的MSI将能够调用其余的api.

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.

例如,我的ADFv2名为joyfactory,只需添加与OwnerContributor同名的MSI.

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

添加后,请在Role assignments中进行检查,如下所示.

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

有关更多详细信息,请检查此 类似问题 .

For more details, check this similar issue.

这篇关于如何使用Azure数据工厂管道调用REST API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆