0
votes

My Azure Function works well if run from the browser https://examplefunction.azurewebsites.net/api/HttpTrigger-Java?name=testEUR.txt&code=mycode

I configured the function to run as a stage in "Logic Apps" - hard-coding the "name" parameter for testing purposes

enter image description here

But then I get "Bad Request" when running the function via logic apps

enter image description here

1

1 Answers

0
votes

This can be solved by adding "authlevel":"anonymous" to function.json which is in under site/wwwroot/examplefunction

Instructions to set the authentication level are as follows

  1. select Platform features. Under Development tools, select Advanced tools (Kudu).
  2. On the Kudu website's title bar, from the Debug Console menu, select CMD.
  3. After the next page appears, from the folder list, select site > wwwroot > examplefunction.
  4. Open the function.json file for editing.
  5. In the bindings object, check whether the authLevel property exists. If the property exists, set the property value to anonymous. Otherwise, add that property and set the value.

Once this has been done, then in the Request body of the logic app, just putting "testEUR.txt" works

Obviously, a better answer would be one that does not seem to apparently disable authentication.