0

I've got an web address with a URL authentication token in the first activity. In the second call I can't authenticate with this token anymore, but based on the cookie that I got from the first call I have access to the data that I need.

So in my current config I do an authentication with a token in the first activity, in the second activity I put the Cookie from this first activity in a variable and in the third activity I want to use this Cookie as a Cookie in my copy data activity.

I've tried to set this Cookie as an additional header, but that's not accepted by the webpage. I'm receiving the errors 'authentication failure'. So probably it really needs to be set as a Cookie. Is this possible in ADF/Synapse?

Thanks in advance!

-----EDIT-----

enter image description here

So in the image above you'll find all the activities that I currently have in my pipeline. The set activities could probably also be combined into one activity, but I've two of them because of testing my config with the full Cookie response and a cleanup one.

enter image description here

So the first activity is making a call to a webpage, in the URL is the token.

enter image description here

In the second activity I fetch the cookie out of the output from the frist activity and store it in a variable of my pipeline.

enter image description here

In the third activity I'll clean this cookie a bit so that only the cookie token is left and not all the rest (like valid till, cookie type, etc.).

enter image description here enter image description here

In the last (but not least) activity I'm trying to use the cleaned up cookie in the header, but it still give an authentication error (the call itself is valid tho, so that's why the status is succeeded. In the SQL table you'll find the response from the webpage.

enter image description here enter image description here

In Postman my config is actually working, also by adding the Cookie as a header. The cookies are empty in Postman btw.

AntonyJ
  • 29
  • 6

1 Answers1

0

this may not be the answer that you're looking for but from what I understand the Web activity in ADF does not support cookies due to security concerns from the Azure ADF team. It will not throw an error, but I would suspect your web activity isn't actually adding the cookie, but also not intelligently informing you that it's dropping the cookie.

jonsch
  • 1
  • 1