DeviceCodeCredential Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A TokenCredential implementation which authenticates a user using the device code flow, and provides access tokens for that user account. For more information on the device code authentication flow see https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/Device-Code-Flow.
public class DeviceCodeCredential : Azure.Core.TokenCredential
type DeviceCodeCredential = class
inherit TokenCredential
Public Class DeviceCodeCredential
Inherits TokenCredential
- Inheritance
Constructors
| DeviceCodeCredential() |
Creates a new DeviceCodeCredential, which will authenticate users using the device code flow. |
| DeviceCodeCredential(DeviceCodeCredentialOptions) |
Creates a new DeviceCodeCredential with the specified options, which will authenticate users using the device code flow. |
Methods
| Authenticate(CancellationToken) |
Interactively authenticates a user via the default browser. |
| Authenticate(TokenRequestContext, CancellationToken) |
Interactively authenticates a user via the default browser. |
| AuthenticateAsync(CancellationToken) |
Interactively authenticates a user via the default browser. |
| AuthenticateAsync(TokenRequestContext, CancellationToken) |
Interactively authenticates a user via the default browser. |
| GetToken(TokenRequestContext, CancellationToken) |
Obtains a token for a user account, authenticating them through the device code authentication flow. This method is called automatically by Azure SDK client libraries. You may call this method directly, but you must also handle token caching and token refreshing. |
| GetTokenAsync(TokenRequestContext, CancellationToken) |
Obtains a token for a user account, authenticating them through the device code authentication flow. This method is called automatically by Azure SDK client libraries. You may call this method directly, but you must also handle token caching and token refreshing. |
Applies to
Feedback
Submit and view feedback for