0
votes

I have a set of Azure functions, that are built on the durable function pattern, which is probably contributing to my problem. I am connecting to them from a logic app http action. This worked fine until I decided to try to secure the functions using AD. I followed this guide exactly - https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-azure-functions but when I do, get a 301 error. I messed with toggling the https settings in the function app and that changes the error to a 302 temporary redirect which makes me assume that something is redirecting the calls between https and http. That is just an assumption since I have zero visibility into what logic apps is actually doing behind the scenes. Has anyone had experience with this an solved the problem? I have checked all of my urls, they are all https, I have https only enabled in the function apps. If I remove the azure ad authentication on the function app, everything works fine (connecting with key). Thanks!

1
I did some more testing today. I think there is an issue with https redirection in general. I removed the requirement for authentication and the 301 response was still present. I then removed the https only setting from the functions and things worked again. I'm guessing something behind the scenes with logic apps is making polling calls or some other call via http instead of https but I can't nail it down. My guess is that when I get to the root of that problem. The instructions on the microsoft page will work as is.Daniel Harmon
I have confirmed that the urls (used for durable functions) returned from the http_start call, are http instead of https. I'm not sure why, but I think this is the best lead I have.Daniel Harmon

1 Answers

0
votes

Ok, after a bit more digging once I figured out that it was the https piece that wasn't being returned properly, it turns out Azure handles things incorrectly when using a linux premium app service plan. The details are here https://github.com/Azure/azure-functions-durable-extension/issues/1446 but the short answer is that I needed to set the app setting ASPNETCORE_FORWARDEDHEADERS_ENABLED = true.