API Reference
The Azure Key Vault JavaScript SDK provides a set of client libraries to interact with secrets, keys, and certificates stored in Azure Key Vault.
Clients
Getting Started Example
Below is a quick example showing how to retrieve a secret using SecretsClient.
import { SecretClient } from "@azure/keyvault-secrets";
import { DefaultAzureCredential } from "@azure/identity";
const credential = new DefaultAzureCredential();
const vaultUrl = "https://<YOUR-KEYVAULT-NAME>.vault.azure.net";
async function getSecret(name) {
const client = new SecretClient(vaultUrl, credential);
const secret = await client.getSecret(name);
console.log(`Secret: ${secret.name} = ${secret.value}`);
}
getSecret("mySecret");
Full Reference
Explore the full class reference on the individual pages linked above. Each page includes method signatures, overloads, and code snippets.