Key Vault returns `Client address is not authorized and caller is not a trusted service.` (ForbiddenByFirewall).
BeginnerTroubleshootingNetwork Connectivity Errors
Answer
Likely causes → Vault firewall is on (default action Deny or public access disabled), and the caller comes from a public IP not in the allow list or not through the Private Endpoint.
Diagnose → The error includes the client IP; az keyvault show -n kv-shop --query properties.networkAcls
Fix →
- Access via the Private Endpoint (fix DNS so the client uses it)
- Or add the caller's IP/VNet rule:
az keyvault network-rule add -n kv-shop --ip-address <ip>/32
Prevent → Private access by design; avoid IP allow lists for CI (hosted runner IPs change).
More on Network Connectivity Errors
A VM with a public IP times out on SSH (`ssh: connect to host 20.x.x.x port 22: Connection timed out`).Beginner`nslookup kv-shop.vault.azure.net` from inside the VNet returns a public IP even though a Private Endpoint exists.IntermediateApplication Gateway returns `502 Bad Gateway` and backend health shows Unhealthy.IntermediateApp Gateway v2 deployment fails or goes unhealthy after a UDR `0.0.0.0/0 → firewall` was added to its subnet.AdvancedTwo VNets peered but VMs can't communicate; peering state shows `Initiated`.IntermediatePeering creation fails because address spaces overlap.Beginner