HTTP 403 Error with Azure Managed Identity for SignalR listKeys Action

Adrian Stauffer 20 Reputation points
2025-04-01T12:56:48.7166667+00:00

Why is the System-Assigned Managed Identity of our Azure App Service (backend-api-application) receiving an HTTP 403 AuthorizationFailed error when attempting to perform the Microsoft.SignalRService/signalR/listKeys/action via the Azure Management API against our Azure SignalR Service (sigr-teamschat-realtime), despite the Managed Identity having the SignalR Service Owner role assigned directly on the SignalR resource? This blocks proper authentication and results in my inability to use SignalR!

Details:

  • Subscription ID: 8f6f524b-8d79-465b-9cb9-b16110407db7
  • Resource Group: rg-teams-chat-proxy
  • App Service Name: backend-api-application
  • App Service Managed Identity Object ID: d2648609-d417-4ad9-9bc5-b33aac48ca70
  • SignalR Service Name: sigr-teamschat-realtime
  • Attempted Action: Microsoft.SignalRService/signalR/listKeys/action (via azure-mgmt-signalr Python SDK, calling the ARM API .../listKeys)
  • Error Received: HTTP 403 Forbidden
  • Code: AuthorizationFailed
  • Message: "The client 'd2648609-d417-4ad9-9bc5-b33aac48ca70' with object id 'd2648609-d417-4ad9-9bc5-b33aac48ca70' does not have authorization to perform action 'Microsoft.SignalRService/signalR/listKeys/action' over scope '/subscriptions/8f6f524b-8d79-465b-9cb9-b16110407db7/resourceGroups/rg-teams-chat-proxy/providers/Microsoft.SignalRService/signalR/sigr-teamschat-realtime' or the scope is invalid. If access was recently granted, please refresh your credentials."
  • Timestamp of Failure: Approximately 2025-04-01T12:28:09 Z (and subsequent retries)
  • ARM Request ID (Example): 27ec2f34-2b6c-4656-a95a-179ef294bbfd (from the 403 response logs)
  • Verification Done:
  • Confirmed via Azure Portal IAM that the Managed Identity d264... has the SignalR Service Owner role assigned directly on the sigr-teamschat-realtime resource.
  • Confirmed via Azure AD Sign-in Logs that the Managed Identity successfully authenticates and acquires tokens for Azure Resource Manager (https://management.azure.com) without Conditional Access issues at the time of failure.
  • App Service has been restarted multiple times after role verification.

Could you please investigate why the Azure Resource Manager authorization check is failing for the listKeys action, despite the RBAC configuration appearing correct in the portal and successful authentication by the Managed Identity?Managed Identity Authorization Failure for SignalR listKeys Action Despite Correct RBAC Role

Question:

Why is the System-Assigned Managed Identity of our Azure App Service (backend-api-application) receiving an HTTP 403 AuthorizationFailed error when attempting to perform the Microsoft.SignalRService/signalR/listKeys/action via the Azure Management API against our Azure SignalR Service (sigr-teamschat-realtime), despite the Managed Identity having the SignalR Service Owner role assigned directly on the SignalR resource?

Details:

  • Subscription ID: 8f6f524b-8d79-465b-9cb9-b16110407db7
  • Resource Group: rg-teams-chat-proxy
  • App Service Name: backend-api-application
  • App Service Managed Identity Object ID: d2648609-d417-4ad9-9bc5-b33aac48ca70
  • SignalR Service Name: sigr-teamschat-realtime
  • Attempted Action: Microsoft.SignalRService/signalR/listKeys/action (via azure-mgmt-signalr Python SDK, calling the ARM API .../listKeys)
  • Error Received: HTTP 403 Forbidden
  • Code: AuthorizationFailed
  • Message: "The client 'd2648609-d417-4ad9-9bc5-b33aac48ca70' with object id 'd2648609-d417-4ad9-9bc5-b33aac48ca70' does not have authorization to perform action 'Microsoft.SignalRService/signalR/listKeys/action' over scope '/subscriptions/8f6f524b-8d79-465b-9cb9-b16110407db7/resourceGroups/rg-teams-chat-proxy/providers/Microsoft.SignalRService/signalR/sigr-teamschat-realtime' or the scope is invalid. If access was recently granted, please refresh your credentials."
  • Timestamp of Failure: Approximately 2025-04-01T12:28:09 Z (and subsequent retries)
  • ARM Request ID (Example): 27ec2f34-2b6c-4656-a95a-179ef294bbfd (from the 403 response logs)
  • Verification Done:
  • Confirmed via Azure Portal IAM that the Managed Identity d264... has the SignalR Service Owner role assigned directly on the sigr-teamschat-realtime resource.
  • Confirmed via Azure AD Sign-in Logs that the Managed Identity successfully authenticates and acquires tokens for Azure Resource Manager (https://management.azure.com) without Conditional Access issues at the time of failure.
  • App Service has been restarted multiple times after role verification.

Could you please investigate why the Azure Resource Manager authorization check is failing for the listKeys action, despite the RBAC configuration appearing correct in the portal and successful authentication by the Managed Identity?

Azure SignalR Service
Azure SignalR Service
An Azure service that is used for adding real-time communications to web applications.
{count} votes

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.