How to fix Authenticate Error when I try to use web activity in Azure data factory to post a message to Azure Queue storage

Steven Wu 0 Reputation points Microsoft Employee
2023-05-31T23:36:26.51+00:00

I am trying to create a message from ADF web activity to Azure queue storage,

Here is the screenshot of my activity in ADF:

User's image

And I also grant the storage queue data contributor role to the ADF I used, but when I try to run this web activity, I get this error when I try to run this activity:

<?xml version="1.0" encoding="utf-8"?><Error><Code>AuthenticationFailed</Code><Message>Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. RequestId:c02aa40d-4003-0032-4518-94ac4a000000 Time:2023-05-31T23:34:03.4900645Z</Message><AuthenticationErrorDetail>Authentication scheme Bearer is not supported in this version.</AuthenticationErrorDetail></Error>

Thanks

Azure Queue Storage
Azure Queue Storage
An Azure service that provides messaging queues in the cloud.
97 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,586 questions
{count} votes

2 answers

Sort by: Most helpful
  1. AnnuKumari-MSFT 31,061 Reputation points Microsoft Employee
    2023-06-01T11:29:17.8366667+00:00

    Hi Steven Wu ,

    Welcome to Microsoft Q&A platform and thanks for posting your question here.

    As I understand your query, you are trying to make a post request to the Azure Queue storage via Web activity in ADF , however , it is throwing authentication Error. Please let me know if that is not the correct understanding.

    Probably , here you are missing on Authorization header. An authorized request requires two headers: the Date or x-ms-date header and the Authorization header.

    You need to generate SAS key and pass the same in authentication header value in the below format:

    Authorization: SharedKey myaccount:ctzMq410TV3wS7upTBcunJTDLEJwMAZuFPfr0mrrA08=
    
    

    and x-ms-date with this syntax: Fri, 26 Jun 2015 23:39:12

    For more details, kindly refer the below resources:

    Authorize with Shared Key

    Azure blob GET request authorization header "x-ms-date" field issue

    Hope it helps. Kindly accept the answer by clicking on Accept answer button. Thankyou


  2. Jairo Collante 0 Reputation points
    2023-10-06T16:58:30.75+00:00

    Hi Steven Wu,

    I was stuck with a similar issue, I was able to solve it with SAS Authentication and following set up:

    URL composition: @concat('https://', account, '.queue.core.windows.net/', ContainerQueue, '/messages?visibilitytimeout=30&timeout=30','&', SASKey)

    URL resulting:

    https://sadatadata.queue.core.windows.net/queue-to-proccess/messages?visibilitytimeout=30&timeout=30&sv=2022-11-02&ss=bfqt&srt=sco&sp=rwlayx&se=2023-10-31T23:18:25Z&st=2023-10-03T15:18:25Z&spr=https&sig=F9ITtRQHY%3D

    InkedWebActivity_LI

    I hope it help you.

    0 comments No comments