A team member had an error today and we got together in an “share screen jam” over Skype.
The error was this: When calling an Azure Function from a Logic app, the function returned a 404. It did not matter what we did. We updated the function, we tried a different Logic App, we called another implementation of the same code, we still got the same error.
The solution was very simple in the end: We had not defined a method for the function call in the Logic App. The function only allowed GET and we did not explicitly choose that.
The default (wrong) way
This is the standard setting. This function only receives data using the headers. These settings generate code without the “method” property.
This resulted in a 404. I feel that a 405 Method not allowed might be a better error message, but it might be related to the fact that no verb is never allowed and might break it on a higher level. See this article for more info.
The right way
This results in this code