Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DeviceCodeCredential

Package version

Enables authentication to Azure Active Directory using a device code that the user can enter into https://microsoft.com/devicelogin.

Hierarchy

  • DeviceCodeCredential

Implements

  • any
  • any

Index

Constructors

Methods

Constructors

constructor

  • Creates an instance of DeviceCodeCredential with the details needed to initiate the device code authorization flow with Azure Active Directory. Creates an instance of DeviceCodeCredential with the details needed to initiate the device code authorization flow with Azure Active Directory.

    Returns DeviceCodeCredential

Methods

getToken

  • getToken(): Promise<AccessToken | null>
  • Authenticates with Azure Active Directory and returns an access token if successful. If authentication cannot be performed at this time, this method may return null. If an error occurs during authentication, an AuthenticationError containing failure details will be thrown.

    Returns Promise<AccessToken | null>

Generated using TypeDoc