KeyVaultClient.GetSecretAsync(url) causing delay

Radhakrishnan 1 Reputation point
2020-06-08T11:56:39.967+00:00

We are using Azure KeyVault to store certain back end credentials that our Azure API uses to query. The GetSecretAsync call always takes at least 15 seconds to return. Is there any way to speed up this call. Below is the code used.

KeyVaultClient kvClient = new KeyVaultClient(new KeyVaultClient.AuthenticationCallback(TokenBasedAccessHelper.GetToken));    
var secret = Task.Run(async () => await kvClient.GetSecretAsync(url)).Result;
return secret.Value
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,184 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,365 questions
{count} votes