Azure Data Factory Web Activity Authorization

Trent B 1 Reputation point
2021-02-09T21:37:32.937+00:00

I need to Get a session ID from a 3rd party end point to then use to make subsequent API data requests.

When i use Postman, and send the Authorization header, everything works fine, and it returns a new Session ID.
The only thing i am passing is the Authorization header (the other headers are default hidden ones in Postman)
No Body, No Parameters being sent

65939-image.png

When do the same GET request in an ADF Web Activity, i get this error:

Error calling the endpoint 'https://api.xxxxxxx.net/Login'. Response status code: ''. More details:Exception message: 'The format of value 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' is invalid.

66062-image.png

Not sure why the authorization code wouldn't work in the Web Activity the same as it does in Postman
Is there something else i am missing here?

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

1 answer

Sort by: Most helpful
  1. MartinJaffer-MSFT 26,096 Reputation points
    2021-02-10T21:05:12.25+00:00

    Hello @Trent B and welcome to Microsoft Q&A.

    I think I ran into a similar issue once before. In that case, I was using Postman for the call to get the token, then I used Postman for the data-bearing call. Then I tried the data-bearing call in ADF using the token obtained with Postman. Then the ADF call failed.

    When I implemented the token-fetching call in ADF, and passed that token to the data-bearing call in ADF, it worked.

    This lead me to believe there is an agent-dependent factor used by the server when the data-bearing call processes the token.

    In the long run, it is better to implement the token-fetching call in ADF because the token eventually expires. Otherwise, when the token expires, you would need to manually update the pipeline with a new token.

    Does this sound like your case?


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.