question

FaisalA-4285 avatar image
0 Votes"
FaisalA-4285 asked FaisalA-4285 commented

Azure web app (private endpoint) can't reference keyvault (private endpoint) secret

Both my web app and key vault are on the same vnet, and the same subnet, both are using private endpoints, however, when I try to reference a secret from the key vault it doesn't work. Looking at the key vault logs, it shows client address is not authorised and the caller is not a trusted service. I have vnet integration enabled on the web app, yet it seems to use its public IP to communicate with the key vault. disabling firewall works, but I need both services to communicate using their private endpoint IP's.

Thanks

azure-webappsazure-key-vault
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

CristianSPIRIDON72 avatar image
0 Votes"
CristianSPIRIDON72 answered FaisalA-4285 commented

Hi @FaisalA-4285,

For key vault with private endpoint to setup, looks like there are few steps that need to be done.

Have you follow the instructions from below answer and still not working?
https://stackoverflow.com/questions/67589490/azure-key-vault-not-allow-access-via-private-endpoint-connection

Hope this helps!

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi CristianSPIRIDON72,

Thanks for getting back to me, I realised when I deploy my web app, app service plan, first time together, the web app can reference secrets in the key vault, however, if i delete and redeploy the web app and private endpoint only, but keep the app service plan, the vnet integration complains about DNS issue, it says "none of the DNS server 168.63.129.16 you configured in app settings is not reachable from this app thus all connections to endpoints with hostname will fail".

If I delete the app service plan and re-deploy everything again together, it works.

strange issue.

thanks

1 Vote 1 ·