Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Unauthorized" error when trying to call an AzureFunction from LogicApp

I have a logic app that executes a workflow by calling Azure Functions in a certain order. It was working fine for a few days, but recently it stopped working. In logic apps run (on Azure Portal) it looks like this: Error screen

The output of the action that was called has statusCode: 401. The Azure Function that's being called does not have any written code that returns that statusCode.

After redeploying the Logic App the issue was gone. Does anyone know what can cause such error? Maybe the Logic App somehow has problems with authenticating to the Azure Function? Could this be related to Azure Functions keys (for example if they changed)?

like image 583
Kuczi Avatar asked Dec 05 '18 10:12

Kuczi


1 Answers

Functions are secured by a an access "code"; so in order to get a function to run from a Logic App; the Logic App has to know what the access code is for the Function.

Function Access code is located here:

enter image description here

Update the Logic App here by adding the "x-functions-key" to the header:

enter image description here

like image 114
Flea Avatar answered Sep 28 '22 23:09

Flea