Azure.Identity.InteractiveBrowserCredential
A TokenCredential implementation which launches the system default browser to interactively authenticate a user and obtain an access token.
The browser will only be launched to authenticate the user once, then will silently acquire access tokens through the user's refresh token as long as it's valid.
For usage instructions, see Interactive browser authentication.
public InteractiveBrowserCredential()
Creates a new InteractiveBrowserCredential with the specified options, which will authenticate users.
Creates a new InteractiveBrowserCredential with the specified options, which will authenticate users with the specified application.
Creates a new InteractiveBrowserCredential with the specified options, which will authenticate users with the specified application.
public InteractiveBrowserCredential(string tenantId, string clientId, TokenCredentialOptions options = null)
Creates a new InteractiveBrowserCredential with the specified options, which will authenticate users with the specified application.
Interactively authenticates a user via the default browser.
public virtual AuthenticationRecord Authenticate(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
Interactively authenticates a user via the default browser. The resulting AuthenticationRecord will automatically be used in subsequent calls to GetToken.
public virtual Task<AuthenticationRecord> AuthenticateAsync(CancellationToken cancellationToken = default)
Interactively authenticates a user via the default browser. The resulting AuthenticationRecord will automatically be used in subsequent calls to GetTokenAsync.
public virtual Task<AuthenticationRecord> AuthenticateAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default)
Interactively authenticates a user via the default browser.