Unable to access key vault URI

Yifang Yang 20 Reputation points
2025-02-28T13:52:32.27+00:00

In our Azure subscription: Modymix, the key vault resource mm-blob-storage-key was created and stored the Blob storage connection string in the vault. I have tried to use console app and the ASP.NET core app to access the key vault to retrieve the secrete, following error occured:


Retry failed after 4 tries. Retry settings can be adjusted in ClientOptions.Retry or by configuring a custom retry policy in ClientOptions.RetryPolicy. (No such host is known. (mm-blob-storage-key.vault.azure.net:443)) (No such host is known. (mm-blob-storage-key.vault.azure.net:443)) (No such host is known. (mm-blob-storage-key.vault.azure.net:443)) (No such host is known. (mm-blob-storage-key.vault.azure.net:443))

The following is the C# code in our console app test program. The error is occured on 3rd line.

string secretName = "mm-blob-connection-string";

var kvUri = $"https://mm-blob-storage-key.vault.azure.net/";

var client = new SecretClient(new Uri(kvUri), new DefaultAzureCredential());

var secret = client.GetSecret(secretName);


We need help to resolve this issue

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,389 questions
{count} votes

Accepted answer
  1. TP 108.6K Reputation points
    2025-03-03T14:32:38.89+00:00

    Hi,

    There is a typo in key vault uri. To make it work you need to change the line to:

    var kvUri = $"https://mm-blolb-storage-key.vault.azure.net/";
    

    Please click Accept Answer and upvote if the above was useful.

    Thanks.

    -TP

    1 person found this answer helpful.

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.