0
votes

I am trying to invoke a session based webservice from Azure Logic apps which requires session id from authentication request to be sent as a cookie for actual request. I am able to authenticate and recieve session id successfully, however when i try to send it as cookie in the next step, it is unsuccessful. Tried below options and got respective responses:

  1. Using HTTP connector -> gave me 'Unresolvablehostname'
  2. using custom logic app connector, with on-premises gateway checked and 'http' option -> SOAP Fault and upon looking at destination logs we could see that Cookie was empty. I have tried sending "Cookie" in headers as well as a parameter but no luck.
  3. using custom logic app connector, with on-premises gateway checked and 'https' option -> certification error and i understand https is not configured and hence wouldn't work.

I tried from SOAP UI and it works when I send cookie in header of the request. or if I check the 'keep same session' box in SOAP UI. But fails with Logic App. could you please help me on how to send cookie from Logic App. where is it getting missed although I am setting it in my application.

2
@Joey Cai, as mentioned below, we are trying on options provided by Microsoft. However function app does not serve the purpose as well and therefore we are trying for a hybrid connection. More like creating an intermediate Webapp and invoking from there. Hope this helps. - nighna

2 Answers

0
votes

The Add new parameter dropdown allows you to enable a checkbox that says Cookie that enables you to enter the HTTP cookie (from dynamic content if you want to). You cannot enter the value straight in the dropdown, so close it down after you selected the checkbox and see a magic Cookie field appear underneath the Authentication field.

enter image description here

More information to be found here: How to call an API with cookie authentication from a Logic App.

0
votes

Here is the answer: You can use HTTP connectors only for a published service.If you are trying to invoke an internal service below is the response from Microsoft team. In short - HTTP connectors do not use gateway so you cannot establish connection & custom connectors do not suppport Cookies. I would choose option 4 from below. Hope this helps:

  1. HTTP action does not support on-premise data gateway, so the hostname or ip could not be resolved because the HTTP action always talks to public network.
  2. If you could use custom connector to connect to on-premise data gateway, you should not get the unresolvedhostname issue. However, the custom connector does not support Cookie authentication, that’s why you could not get it through.
  3. One workaround is using application gateway to reverse proxy services and publish your on-premise server to public. It would act like an VPN and you could use HTTP action in logic app to establish connection.
  4. Another workaround is trying to use Function App to make the HTTP request with Cookies