InteractiveBrowserCredential.Authenticate Method
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.
Overloads
Authenticate(CancellationToken) |
Interactively authenticates a user via the default browser. |
Authenticate(PopTokenRequestContext, CancellationToken) |
Interactively authenticates a user via the default browser. The resulting AuthenticationRecord will automatically be used in subsequent calls to GetToken(TokenRequestContext, CancellationToken). |
Authenticate(TokenRequestContext, CancellationToken) |
Interactively authenticates a user via the default browser. The resulting AuthenticationRecord will automatically be used in subsequent calls to GetToken(TokenRequestContext, CancellationToken). |
Authenticate(CancellationToken)
Interactively authenticates a user via the default browser.
public virtual Azure.Identity.AuthenticationRecord Authenticate (System.Threading.CancellationToken cancellationToken = default);
abstract member Authenticate : System.Threading.CancellationToken -> Azure.Identity.AuthenticationRecord
override this.Authenticate : System.Threading.CancellationToken -> Azure.Identity.AuthenticationRecord
Public Overridable Function Authenticate (Optional cancellationToken As CancellationToken = Nothing) As AuthenticationRecord
Parameters
- cancellationToken
- CancellationToken
A CancellationToken controlling the request lifetime.
Returns
The result of the authentication request, containing the acquired AccessToken, and the AuthenticationRecord which can be used to silently authenticate the account.
Applies to
Authenticate(PopTokenRequestContext, CancellationToken)
Interactively authenticates a user via the default browser. The resulting AuthenticationRecord will automatically be used in subsequent calls to GetToken(TokenRequestContext, CancellationToken).
public virtual Azure.Identity.AuthenticationRecord Authenticate (Azure.Core.PopTokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default);
abstract member Authenticate : Azure.Core.PopTokenRequestContext * System.Threading.CancellationToken -> Azure.Identity.AuthenticationRecord
override this.Authenticate : Azure.Core.PopTokenRequestContext * System.Threading.CancellationToken -> Azure.Identity.AuthenticationRecord
Public Overridable Function Authenticate (requestContext As PopTokenRequestContext, Optional cancellationToken As CancellationToken = Nothing) As AuthenticationRecord
Parameters
- requestContext
- Azure.Core.PopTokenRequestContext
The details of the authentication request.
- cancellationToken
- CancellationToken
A CancellationToken controlling the request lifetime.
Returns
The AuthenticationRecord of the authenticated account.
Exceptions
Thrown when the authentication failed.
Applies to
Authenticate(TokenRequestContext, CancellationToken)
Interactively authenticates a user via the default browser. The resulting AuthenticationRecord will automatically be used in subsequent calls to GetToken(TokenRequestContext, CancellationToken).
public virtual Azure.Identity.AuthenticationRecord Authenticate (Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = default);
abstract member Authenticate : Azure.Core.TokenRequestContext * System.Threading.CancellationToken -> Azure.Identity.AuthenticationRecord
override this.Authenticate : Azure.Core.TokenRequestContext * System.Threading.CancellationToken -> Azure.Identity.AuthenticationRecord
Public Overridable Function Authenticate (requestContext As TokenRequestContext, Optional cancellationToken As CancellationToken = Nothing) As AuthenticationRecord
Parameters
- requestContext
- TokenRequestContext
The details of the authentication request.
- cancellationToken
- CancellationToken
A CancellationToken controlling the request lifetime.
Returns
The AuthenticationRecord of the authenticated account.
Applies to
Azure SDK for .NET