Hello Hariharan Viswanath
Based upon the error this may happen for different reasons:
"Your Key Vault has a wrongly configured Private Endpoint (PE)"
"You have a Proxy/Firewall or such devices that are blocking your connectivity to the Key Vault's Data Plane Endpoint (DPE)"
"Your Key Vault has recently been migrated from its initial Directory to a new Directory"
When you have a Private Endpoint configured for your Key Vault, make sure the following things also described here are set as expected:
1. Confirm that the connection is approved and succeeded
The following steps validate that the private endpoint connection is approved and succeeded:
Open the Azure portal and open your key vault resource.
In the left menu, select Networking.
Click the Private endpoint connections tab. This will show all private endpoint connections and their respective states. If there are no connections, or if the connection for your Virtual Network is missing, you have to create a new Private Endpoint. This will be covered later.
Still in Private endpoint connections, find the one you are diagnosing and confirm that "Connection state," is Approved and "Provisioning state" is Succeeded.
If the connection is in "Pending" state, you might be able to just approve it.
If the connection "Rejected", "Failed", "Error", "Disconnected" or other state, then it's not effective at all, you have to create a new Private Endpoint resource.
It's a good idea to delete ineffective connections in order to keep things clean.
2. Find the key vault private IP address in the virtual network
Open the Azure portal and open your key vault resource.
In the left menu, select Networking.
Click the Private endpoint connections tab. This will show all private endpoint connections and their respective states.
Find the one you are diagnosing and confirm that "Connection state" is Approved and Provisioning state is Succeeded. If you are not seeing this, go back to previous sections of this document.
When you find the right item, click the link in the Private endpoint column. This will open the Private Endpoint resource.
The Overview page may show a section called DNS Configuration. Confirm that there is only one entry that matches the key vault hostname. That entry shows the key vault private IP address.
You may also click the link at Network interface and confirm that the private IP address is the same displayed in the previous step. The network interface is a virtual device that represents key vault.
- Validate the DNS resolution
DNS resolution is the process of translating the key vault hostname (example: [fabrikam.vault.azure.net] ) into an IP address (example: 10.1.2.3). The following subsections show expected results of DNS resolution in each scenario.
- Key Vault without Private Link or with a broken Private Link will resolve to Key Vault's public IP and have no privatelink alias after a "nslookup":
We look forward to hearing from you; Please note that our initial response does not always resolve the issue right away. However, with your help and more detailed information, we can work together to find a solution