【问题标题】:How to use Oauth 2.0 Authorization in Logic App's HTTP connector?如何在 Logic App 的 HTTP 连接器中使用 Oauth 2.0 授权?
【发布时间】:2021-10-19 15:52:35
【问题描述】:

有一个 API,我需要从 Azure 逻辑应用程序中迭代地返回数据。为此,我需要两个 HTTP 步骤,一个是接收访问令牌,另一个是使用令牌返回数据。不幸的是,我只能通过 Oauth 2.0 授权接收令牌,并且 Azure Logic App 没有内置到连接器的授权功能。有没有办法解决这个问题?

【问题讨论】:

    标签: oauth-2.0 azure-logic-apps httpconnection


    【解决方案1】:

    目前,您可以使用 Active Directory Oauth 授权而不是连接器接收令牌。

    如果你启用了Azure AD OAuth,你可以按照这个(如果没有,你可以Enable Azure AD OAuth for your logic app):

    Populate the Authorization section in your logic app

    在代码视图中打开逻辑应用定义,转到 HTTP 操作定义,找到授权部分,并包含以下属性:

    {
       "tenant": "<tenant-ID>",
       "audience": "<client-ID-from-Part-2-web-app-or-API app>",
       "clientId": "<client-ID-from-Part-1-logic-app>",
       "secret": "<key-from-Part-1-logic-app>",
       "type": "ActiveDirectoryOAuth"
    }
    

    您可以参考How can I use OAuth 2.0 Authentication in an Azure Logic App?Oauth Authentication in Logic AppsCall service endpoints over HTTP or HTTPS from Azure Logic AppsLimitations of Azure Active Directory Open Authentication (Azure AD OAuth) for authorizing inbound calls to the Request trigger.

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-07-23
      • 2013-10-05
      • 2014-09-08
      • 2015-01-15
      • 1970-01-01
      • 1970-01-01
      • 2013-03-16
      相关资源
      最近更新 更多