Only available in Node.js
Example using the KeyClient
from @azure/keyvault-keys:
const tokenCredential = new OnBehalfOfCredential({
tenantId,
clientId,
certificatePath: "/path/to/certificate.pem",
userAssertionToken: "access-token"
});
const client = new KeyClient("vault-url", tokenCredential);
await client.getKey("key-name");
Example using the KeyClient
from @azure/keyvault-keys:
const tokenCredential = new OnBehalfOfCredential({
tenantId,
clientId,
clientSecret,
userAssertionToken: "access-token"
});
const client = new KeyClient("vault-url", tokenCredential);
await client.getKey("key-name");
Creates an instance of the OnBehalfOfCredential with the details needed to authenticate against Azure Active Directory with path to a PEM certificate, and an user assertion.
Example using the KeyClient
from @azure/keyvault-keys:
const tokenCredential = new OnBehalfOfCredential({
tenantId,
clientId,
certificatePath: "/path/to/certificate.pem",
userAssertionToken: "access-token"
});
const client = new KeyClient("vault-url", tokenCredential);
await client.getKey("key-name");
Optional parameters, generally common across credentials.
Creates an instance of the OnBehalfOfCredential with the details needed to authenticate against Azure Active Directory with a client secret and an user assertion.
Example using the KeyClient
from @azure/keyvault-keys:
const tokenCredential = new OnBehalfOfCredential({
tenantId,
clientId,
clientSecret,
userAssertionToken: "access-token"
});
const client = new KeyClient("vault-url", tokenCredential);
await client.getKey("key-name");
Optional parameters, generally common across credentials.
Authenticates with Azure Active Directory and returns an access token if successful. If authentication fails, a CredentialUnavailableError will be thrown with the details of the failure.
Generated using TypeDoc
Enables authentication to Azure Active Directory using the On Behalf Of flow. Enables authentication to Azure Active Directory using the On Behalf Of flow.