Logic App/Power Automate Failure: Persistent 'UnauthorizedGateway' Error on Azure Service Bus Action

Anonymous
2025-12-12T21:34:26.14+00:00

We are experiencing a critical failure in our Logic App workflows at the Send message action, which uses the Azure Service Bus connector.

 

The flow consistently fails at this step with the high-level error message: UnauthorizedGateway (or BadGateway).

We have performed extensive troubleshooting and confirmed that the configuration in the failing environment is identical to our working environments (QA/Dev):

 

1.  IAM/Roles: The Managed Identity of the Logic App is correctly configured with the necessary Azure Service Bus Data Sender role.

2.  Connection: The underlying Service Bus API Connection has been validated and/or re-created using the valid Shared Access Policy (SAP) key with Send permissions.

3.  Endpoints: All networking and firewall rules are verified to allow traffic to the Service Bus endpoint. 4.  Parameters: All mandatory parameters, including the Queue/Topic Name, are correctly present in the action definition.

 

Despite confirming that all IAM roles, endpoints, and credentials are in place and correct, the connector continues to return an UnauthorizedGateway error. We require investigation into the connector's behavior and the reason it is failing to authenticate properly.

 

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. Pravallika KV 3,870 Reputation points Microsoft External Staff Moderator
    2025-12-12T23:06:34.1333333+00:00

    Hi AakVa-1147,

    Thanks for reaching out to Microsoft Q&A.

    Could you check and confirm below:

    1. Go to the API connection in the failing environment: Azure Portal => Resource Group => Connections => <servicebus> image
    2. Open Edit API connection
    3. Select any of the option: Client certificate Auth or Managed Identity

    Check if you see "This connection uses Managed Identity" to make sure it is using managed identity.

    image

    Recreate the Connection in the Proper Mode to resolve the issue:

    1. Delete the existing API connection (servicebus).
    2. Recreate a new connection:
      • Authentication: Managed Identity
      • Ensure the Logic App’s System-Assigned or User-Assigned Identity is selected.
    3. Assign the following to the identity on the Service Bus namespace:
      • Azure Service Bus Data Sender (or) Azure Service Bus Data Owner
    4. Save the connection.
    5. Reopen Logic App designer and reselect the connection.

    Hope it helps!


    Please do not forget to click "Accept the answer” and Yes, this can be beneficial to other community members.

    User's image

    If you have any other questions, let me know in the "comments" and I would be happy to help you.

    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.