I have an Azure KeyVault that is secured at the network-level. I only allow connections from 2 specific vnets/subnets.

However, I also want one of my web app (outside of the subnets) to be able to fetch secrets from the KeyVault. I added an access policy to let my Web App Get and List secrets.

I thought that setting Allow trusted Microsoft services to bypass this firewall? would be enough to let my App Service access the KeyVault (they are in the same subscription). Apparently it's not the case.

What setting should I use to be able to keep my firewall rules and allow my web app to fetch the secrets?


The simplest approach would be to add your Web App’s list of “Outbound IPs” (found in the properties section of your web app’s blade) to the Key Vault’s firewall.

| improve this answer | |
  • Yes that's what I thought. I was wondering if there was a more "built-in" approach, knowing that the IPs can change. – alexbf Jan 22 at 11:51
  • The IPs “shouldn’t” change unless something drastic happens to the host. – Greg W Jan 22 at 11:53
  • True, and also when it is scaled up to higher tiers. docs.microsoft.com/en-us/azure/app-service/… – alexbf Jan 22 at 12:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.