0
votes

So I'm trying to set some custom meta-data for Blobs inside a Logic App. Unfortunately there's currently no Action which is capable of setting custom data on blobs.

So as a workaround I try to set the meta-data by using the REST API and configured the following Action (SharedKey is in Format StorageAccountName:AccessKey1):

Configuration of HTTP Action to set meta-data

So for the x-ms-date header I use the expression utcNow() but that doesn't seem to do the job as I get the following error message:

"x-ms-date": "2018-09-04T14:20:01.1767834Z"

AuthenticationFailedServer failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. RequestId:0c5c817f-101e-00b5-7c5a-44ca3c000000 Time:2018-09-04T14:20:01.2206329ZThe Date header in the request is incorrect.

Strangely enough, besides the x-ms-date Header also the Date header already seems to be included automatically in the correct format:

Output of the finished action

So does anybody see an error here (wrong utc-date Expression for example)? Maybe it's not even the wrong x-ms-date header and I'm on the wrong track..

2

2 Answers

0
votes

Issue could be related to the format of the final value that Authorization header is getting.

Take a look at this post on MSDN forums

0
votes

I had a silimar issue and figured out how to Authenticate. Maybe you can use it for your solution:

Here is what worked for me:

  1. Enabled "Managed Identity" on the Logic App.

  2. Added Storage-Queue-Contributor permissions on the storage queue.

  3. Used utcnow('R') to get this date format ("Tue, 08 Sep 2020 12:03:08 GMT") for x-ms-date HTTP header (no doc from MS about this).

  4. Inserted JSON data inside

    <QueueMessage> 
        <MessageText>
        {
          "car": "Audi",
          "year": 1983
        }
       </MessageText>  
    </QueueMessage>
    

Final result in Logic App designer: enter image description here