Class InteractiveBrowserCredential | Azure SDK for Net
Jessica Wood
Published Feb 16, 2026
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 users refresh token as long as it's valid.
Inheritance
InteractiveBrowserCredential
Namespace: Azure.Identity
Assembly: Azure.Identity.dll
Syntax
public class InteractiveBrowserCredential : Azure.Core.TokenCredential Constructors
InteractiveBrowserCredential()
Declaration
public InteractiveBrowserCredential (); InteractiveBrowserCredential(String)
Declaration
public InteractiveBrowserCredential (string clientId); Parameters
| String clientId The client id of the application to which the users will authenticate |
InteractiveBrowserCredential(String, String, TokenCredentialOptions)
Declaration
public InteractiveBrowserCredential (string tenantId, string clientId, Azure.Identity.TokenCredentialOptions options = null); Parameters
| String tenantId The tenant id of the application and the users to authenticate. Can be null in the case of multi-tenant applications. |
| String clientId The client id of the application to which the users will authenticate |
| TokenCredentialOptions options The client options for the newly created InteractiveBrowserCredential. |
Methods
GetToken(TokenRequestContext, CancellationToken)
Obtains an AccessToken token for a user account silently if the user has already authenticated, otherwise the default browser is launched to authenticate the user. This method is called by Azure SDK clients. It isn't intended for use in application code.
Declaration
public override Azure.Core.AccessToken GetToken (Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = null); Parameters
Returns
GetTokenAsync(TokenRequestContext, CancellationToken)
Obtains an AccessToken token for a user account silently if the user has already authenticated, otherwise the default browser is launched to authenticate the user. This method is called by Azure SDK clients. It isn't intended for use in application code.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public override System.Threading.Tasks.ValueTask<Azure.Core.AccessToken> GetTokenAsync (Azure.Core.TokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken = null);