Oliver Nilsen
Oliver Nilsen

Reputation: 1283

Azure Storage Queue and Managed Identity

I am having trouble connecting my Logic App to an Azure Storage Queue. I followed MS guide for setting it up: https://learn.microsoft.com/en-us/azure/logic-apps/create-managed-service-identity

Here is my test Logic App to post something to my queue:

enter image description here

enter image description here

enter image description here

When my Logic App is triggered I get an error:

enter image description here

AuthenticationFailed.Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.

Why is it requiring me to include an Authorization Header, when I stated that I want to use Managed Identity? As far as I have read on MS docs, the Queues do support Managed Identities.

Upvotes: 2

Views: 1455

Answers (2)

Oliver Nilsen
Oliver Nilsen

Reputation: 1283

This worked for me: Put/Post JSON message to Azure Storage Queue via Logic App

Final result in Logic App designer enter image description here

Upvotes: 1

Jim Xu
Jim Xu

Reputation: 23141

According to my test, if we want to call Azure queue storage rest API with Azure AD auth, we need to specify x-ms-version in the request header and its value should be 2017-11-09 or higher. Otherwise, we will get error 403. For more details, please refer to the document and the document

My test is as below 1. If I do not specify x-ms-version, I get the error

enter image description here

  1. If I specify x-ms-version, it is ok

My request Headers in HTTP action

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

enter image description here

Result:

enter image description here

Upvotes: 3

Related Questions