azure-logic-apps - Azure 存储队列和托管身份

标签 azure-logic-apps azure-storage-queues azure-managed-identity

我在将逻辑应用连接到 Azure 存储队列时遇到问题。我按照 MS 指南进行设置:https://learn.microsoft.com/en-us/azure/logic-apps/create-managed-service-identity

这是我的测试逻辑应用程序,用于将某些内容发布到我的队列中:

enter image description here

enter image description here

enter image description here

当我的逻辑应用程序被触发时,我收到错误:

enter image description here

AuthenticationFailed。服务器无法验证请求。确保授权 header 的值格式正确,包括签名。

当我声明要使用托管身份时,为什么要求我包含授权 header ?据我阅读的 MS 文档,队列确实支持托管身份。

最佳答案

根据我的测试,如果我们想使用 Azure AD 身份验证调用 Azure 队列存储 REST API,我们需要在请求 header 中指定 x-ms-version ,其值应为 2017-11-09 或更高。否则,我们会收到错误403。更多详细信息,请参阅documentdocument

我的测试如下 1. 如果我不指定 x-ms-version,则会收到错误

enter image description here

  • 如果我指定x-ms-version,就可以了
  • HTTP 操作中的我的请求 header

     "Content-Type": "application/xml",
      "x-ms-date": "@{utcNow('R')}",
      "x-ms-version": "2019-07-07"
    

    enter image description here

    结果:

    enter image description here

    关于azure-logic-apps - Azure 存储队列和托管身份,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62005420/

    相关文章:

    c# - 将类对象作为消息发送到 Azure 队列存储

    Azure 逻辑应用 : how to run Powershell script or Azure CLI?

    azure - 访问 token 已被错误的受众获取

    Python + Azure 存储队列 receive_messages()

    nservicebus - 是否可以在 NServiceBus 中对事件发布者进行范围/分组?

    azure - 无法在同一 Arm 模板中引用 Key Vault 的用户分配身份的principalId

    azure - 如何将具有特定模式的 csv 文件解析为逻辑应用服务中的数组

    Azure 逻辑应用 - 内置连接器与托管连接器

    azure - 使用 ARM 模板和 Key Vault 创建 Azure SQL 的最佳实践是什么

    azure - 二头肌中用户分配身份的输出参数?