【问题标题】:Power Automate Custom Connector Authorization HeaderPower Automate 自定义连接器授权标头
【发布时间】:2022-10-21 08:10:04
【问题描述】:

我正在尝试使用我之前在 Powershell 中使用过的 API 在 Power Automate 中创建自定义连接器。问题是我在标题中需要的一个参数是Authorization,由于某种原因微软不允许这样做。我在网上找到了几个关于如何解决它的论坛,但没有任何效果。以下是一些具有潜在解决方案的论坛:

https://powerusers.microsoft.com/t5/Microsoft-Dataverse/Authorization-header-is-not-allowed-Use-API-Key-authentication/m-p/894511#M10780

https://powerusers.microsoft.com/t5/Connector-Development/Authorization-header-using-HTTP-via-on-premise-datagateway/m-p/1339127

尝试在我的标头中创建带有授权的标头时遇到相同的错误消息:

'Authorization' header is not allowed. Use 'API Key' authentication type in the Security tab to set this header.

这是我的设置。 Authorization 参数的字符串值应为“rest_api_key=xxxxxxxxxxx”

尽管我覆盖了标头,但我的连接中的实际请求标头看起来像这样。令牌是一个很长的随机字符串,因此为了简单起见,我将其缩短了。

{
  "Authorization": "Bearer eyJ0eXAiOiJKV1...."
}

当我实际进行连接时,我输入了完整的值“rest_api_key=xxxxxx”作为身份验证参数。

尝试设置授权标头时是否有其他人遇到此问题?

【问题讨论】:

    标签: rest power-automate power-automate-custom-connector


    【解决方案1】:

    在 Header Value 中,只需提供您的 api 的安全密钥。

    【讨论】:

      【解决方案2】:

      我将安全选项卡下的身份验证类型设置为“无身份验证”。 设置新策略“设置 HTTP 标头”,标头名称“授权”,标头值“基本 NzZiZ ............”(您需要它是什么)。 如果标头存在,则操作,“覆盖”。 对“请求”运行策略。

      这对我有用。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2021-07-20
        • 2017-07-23
        • 1970-01-01
        • 2011-12-09
        • 2020-05-13
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多