To access KV from AppGW, why do I have to allow VNet as well as allow trusted services?

MartinHerbener-7973 65 Reputation points
2025-03-20T15:19:53.14+00:00

Documentation for allowing App GW to get certs from KV https://learn.microsoft.com/en-us/azure/application-gateway/key-vault-certs#verify-firewall-permissions-to-key-vault says

For Virtual networks, select + Add existing virtual networks, and then add the virtual network and subnet for your Application Gateway instance.

and also

Select Yes to allow trusted services to bypass the Key Vault's firewall.

Why do I have to do both? Doesn't checking the "Allow trusted Microsoft services to bypass this firewall" mean I shouldn't have to specify the virtual network?

According to https://learn.microsoft.com/en-us/azure/key-vault/general/overview-vnet-service-endpoints#trusted-services, Azure Application Gateway IS a trusted service in this scenario.

thanks!

Martin

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} vote

Accepted answer
  1. Venkat V 1,485 Reputation points Microsoft External Staff
    2025-03-21T14:25:07.72+00:00

    Hi @MartinHerbener-7973

    Scenario 1

    If you have added the VNet and Subnet of the Application Gateway to the Key Vault firewall settings, the Application Gateway can access Key Vault by enabling the Allow Trusted Services option.

    If a service is not on the trusted list, it will be denied access to Key Vault regardless of whether the "Allow trusted Microsoft services" option is enabled or not. This is because the "Trusted Services" setting does not impact untrusted services.

    enter image description here

    Scenario 2

    If the service is not on the Trusted Services list, enabling the "Allow Trusted Services" option will not grant the access. In this case, you need to enable a Private Endpoint for private connectivity.

    I hope this helps to resolve your issue.


    Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.

    0 comments No comments

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.