Unable to run Logic Apps step to execute a query on Azure SQL using managed identity failed due to Unauthorized 401 error

Jonathan Robinson 0 Reputation points
2025-10-20T19:56:22.1433333+00:00

I have a Logic App with only 2 steps.

Step 1: When an HTTP request is received

Step 2: Execute a SQL query (V2)
Step 2 is using managed identity but fails on the run due to Unauthorized 401 error.

I can't seem to get past this step.

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jonathan Robinson 0 Reputation points
    2025-10-21T00:07:01.7166667+00:00

    The answer was that Azure had an identity cached. I had to create a new logic app with a different name and re-create the user and roles in the SQL DB with the new logic app name.

    0 comments No comments

Your answer

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