ADF Web Activity - Fails with custom Authorization Header

TX Aggie 00 26 Reputation points
2022-12-14T22:28:21.55+00:00

In ADF, we need to ingest some data from Amazon Vendor Central via the SP-API. This requires you to sign the headers. When using the custom Authorization header, the web activity fails with the following error:

Header:

"Authorization": "AWS4-HMAC-SHA256 Credential=ASIAUSIDVNGYYVMPNRPR/20221214/us-east-1/execute-api/aws4_request, SignedHeaders=host;x-amz-access-token;x-amz-content-sha256;x-amz-date;x-amz-security-token, Signature=a7bf55552b65c231b54440ff5c543f851297214f2bd514d9301c6b3583d435c8"  

Error:

Error calling the endpoint 'https://sellingpartnerapi-na.amazon.com'. Response status code: 'NA - Unknown'. More details: Exception message: 'NA - Unknown [ClientSideException] The format of value 'AWS4-HMAC-SHA256 Credential=ASIAUSIDVNGYYVMPNRPR/20221214/us-east-1/execute-api/aws4_request, SignedHeaders=host;x-amz-access-token;x-amz-content-sha256;x-amz-date;x-amz-security-token, Signature=a7bf55552b65c231b54440ff5c543f851297214f2bd514d9301c6b3583d435c8' is invalid.'.  
  
Request didn't reach the server from the client. This could happen because of an underlying issue such as network connectivity, a DNS failure, a server certificate validation or a timeout.  

Does something in this header value need to be escaped for ADF to successfully use this?

Thanks,
Scott

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,623 questions
{count} votes

2 answers

Sort by: Most helpful
  1. AnnuKumari-MSFT 34,551 Reputation points Microsoft Employee Moderator
    2022-12-15T09:16:40.227+00:00

    Hi @TX Aggie 00 ,

    Thankyou for using Microsoft Q&A platform and thanks for posting your query.

    As I understand your issue, you are facing network connectivity related error while using web activity in Azure data factory. Please let me know if that is not the correct understanding.

    I tried to replicate your issue using google API, and was able to get through it . As you mentioned, you are getting error as soon as you add comma in the headers. You can add multiple headers instead of separating them by comma like below:

    270878-image.png

    Please try this approach and let us know how it goes. Thankyou.

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you.
      Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators

  2. Andres De Abreu 0 Reputation points
    2023-07-25T09:52:51.6966667+00:00

    @TX Aggie 00 where you able to connect to the SP-API? looking for a solution

    Thanks

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.