Application Gateway “Key Vault Doesn’t Allow Access to the Managed Identity” Error Despite Proper RBAC Role Assignments

Gavin 20 Reputation points
2025-04-10T20:36:15.2933333+00:00

I’m using a Standard_v2 Application Gateway to serve HTTPS for a web app deployed on an Azure VM. I’ve attached a user-assigned managed identity to the Application Gateway using the Identity blade in the portal. My Key Vault is configured in Azure RBAC mode (not the legacy access policies). I’ve assigned the following roles to the gateway’s managed identity at the Key Vault resource scope:

  • Key Vault Administrator (which includes both certificate and secret read permissions)

Key Vault Certificates Officer

Key Vault Secrets Officer

There are no deny assignments or resource locks, and I’ve waited several hours for all role assignments to propagate. Despite all of this, when I try to configure an HTTPS listener on the Application Gateway to “choose a certificate from Key Vault,” I receive the error:

“This key vault doesn’t allow access to the managed identity.”

What additional configuration or troubleshooting steps could resolve this issue?

I’ve verified that both the Key Vault and Application Gateway are in the same subscription and tenant.

The managed identity shown in the Application Gateway matches the one receiving the RBAC assignments in Key Vault.

Activity logs in Key Vault show no further authorization failures.

Has anyone encountered this persistent error under similar conditions? Any insights or recommendations would be greatly appreciated.I’m using a Standard_v2 Application Gateway to serve HTTPS for a web app deployed on an Azure VM. I’ve attached a user-assigned managed identity to the Application Gateway using the Identity blade in the portal. My Key Vault is configured in Azure RBAC mode (not the legacy access policies). I’ve assigned the following roles to the gateway’s managed identity at the Key Vault resource scope:

Key Vault Administrator (which includes both certificate and secret read permissions)

Key Vault Certificates Officer

Key Vault Secrets Officer

There are no deny assignments or resource locks, and I’ve waited several hours for all role assignments to propagate. Despite all of this, when I try to configure an HTTPS listener on the Application Gateway to “choose a certificate from Key Vault,” I receive the error:

“This key vault doesn’t allow access to the managed identity.”

What additional configuration or troubleshooting steps could resolve this issue?

I’ve verified that both the Key Vault and Application Gateway are in the same subscription and tenant.

The managed identity shown in the Application Gateway matches the one receiving the RBAC assignments in Key Vault.

Activity logs in Key Vault show no further authorization failures.

Has anyone encountered this persistent error under similar conditions? Any insights or recommendations would be greatly appreciated.

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,172 questions
{count} votes

Accepted answer
  1. Praveen Bandaru 2,665 Reputation points Microsoft External Staff
    2025-04-10T22:34:41.7+00:00

    Hello Gavin

    I understand that you are trying to add the certificate in the application gateway from the key vault, but it is failing.

    If you want to add a certificate from the key vault, you can use the "vault access policy".

    Select the managed identity as the principal and grant it the 'Get' and 'List' permissions for both Secrets and Certificates.

    Check the below screen shot for more understanding:

    User's image User's image

    We tested it in our environment, and it is working for us. If you still encounter the issue after testing this step, please try to share a screenshot of the error.


    Hope the above answer helps! Please let us know do you have any further queries.

    Please do consider to “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    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.