Calling an API from a Logic App is pretty straightforward. You open up the Logic App Designer and add an HTTP Action. Specify the method to use and the URI you want to call and you’re good to go!

When the API you want to call uses Cookie Authentication, this seems pretty straightforward too. After all, the HTTP Action has an Authentication property you can set. However, this property doesn’t include Cookie authentication. These are the available options:

  • None
  • Basic
  • Client Certificate
  • Active Directory OAuth
  • Raw
  • Managed Identity
    – or –
  • Enter custom value
Logic Apps - Setting a cookie header
How NOT to add Cookie Authentication

The image above shows the first try to add cookie authentication in a Logic App. Unfortunately, this returns an Unauthorized. If you click the “Add new parameter” field, a little bit of magic happens which shows you this:

Logic Apps - Add new parameter
What’s this magic?!!?!

As you can see, the “Add new parameter” dropdown allows you to enable a checkbox that says “Cookie” that enables you to enter the HTTP cookie. 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.

The end result looks something like this:

Calling an API with Cookie Authentication from Logic Apps
There you go … ! 🤓

And that’s it! Of course you can use any cookie value. It includes options for using expressions, so you can store the cookie in for instance a variable and use it from there.

If you have any questions, leave a comment or contact me. Hope this helps!