Azure logic app which calls an Azure Function is faliing

VickyD 86 Reputation points
2024-02-28T06:29:04.3233333+00:00

Hi Team,

I have a azure logic app which calls a azure function.

When I run the Azure function on the portal with the required input parameter (body), it runs fine and gives me the expected results.

But when the same is called in the logic app, it throws an error saying "Unauthorized" in the activity where the azure function is called.

The logic app was working fine before we made changes to the azure function recently.

error screenshot:

User's image

Note:

  1. The Azure Functions app was recently redeployed for some recent changes.
  2. Azure function is developed in python
  3. Azure function is hosted on a Linux system

Please help me to resolve this.

Thanks,

Vikram

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,909 questions
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,542 questions
0 comments No comments
{count} votes

Accepted answer
  1. MayankBargali-MSFT 70,936 Reputation points Moderator
    2024-02-28T06:39:30.1966667+00:00

    @Vikram Dayananda Thanks for reaching out.

    As per the error your function app was not able to authenticate the request sent to your logic app and therefore you are getting the Unauthorized error. It looks like the authentication may have changed at your function app for the HTTP trigger (function) that you are calling or have added the managed identity to your function app.

    If it is authentication changed then the easiest way would be to delete and recreate the action as it would add the right authentication again in your logic app. If the managed identity changed then you need to provide the right permission to your logic app so it can access the function resource.

    Reference: https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-azure-functions?tabs=consumption

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.