Azure存储队列和托管身份

时间:2020-05-25 15:14:44

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

我无法将Logic App连接到Azure存储队列。我按照MS指南进行了设置:https://docs.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.Server无法验证请求。确保包括签名在内的Authorization标头的值正确形成。

当我说我要使用托管身份时,为什么要求我包括一个授权标头?据我在MS文档上所读的内容,队列确实支持托管身份。

2 个答案:

答案 0 :(得分:3)

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

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

enter image description here

  1. 如果我指定x-ms-version,就可以了

我在HTTP操作中的请求标头

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

enter image description here

结果:

enter image description here

答案 1 :(得分:0)

这对我有用:Put/Post JSON message to Azure Storage Queue via Logic App

Logic App设计器中的最终结果 enter image description here