Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface AzureApplicationCredentialOptions

Package version

Provides options to configure the AzureApplicationCredential class.

Hierarchy

Index

Properties

Optional authorityHost

authorityHost: undefined | string

The authority host to use for authentication requests. Possible values are available through AzureAuthorityHosts. The default is "https://login.microsoftonline.com".

Optional loggingOptions

loggingOptions: LogPolicyOptions & { allowLoggingAccountIdentifiers?: undefined | false | true }

Allows logging account information once the authentication flow succeeds.

Optional managedIdentityClientId

managedIdentityClientId: undefined | string

Optionally pass in a user assigned client ID to be used by the ManagedIdentityCredential. This client ID can also be passed through to the ManagedIdentityCredential through the environment variable: AZURE_CLIENT_ID.

Optional tokenCachePersistenceOptions

tokenCachePersistenceOptions: TokenCachePersistenceOptions

Options to provide to the persistence layer (if one is available) when storing credentials.

You must first register a persistence provider plugin. See the @azure/identity-cache-persistence package on NPM.

Example:

import { cachePersistencePlugin } from "@azure/identity-cache-persistence";
import { useIdentityPlugin, DeviceCodeCredential } from "@azure/identity";

useIdentityPlugin(cachePersistencePlugin);

async function main() {
  const credential = new DeviceCodeCredential({
    tokenCachePersistenceOptions: {
      enabled: true
    }
  });
}

main().catch((error) => {
  console.error("An error occurred:", error);
  process.exit(1);
});

Generated using TypeDoc