Table of Contents

Class InteractiveBrowserCredentialOptions

Namespace
Azure.Identity
Assembly
Azure.Identity.dll

Options to configure the InteractiveBrowserCredential.

public class InteractiveBrowserCredentialOptions : TokenCredentialOptions
Inheritance
InteractiveBrowserCredentialOptions
Inherited Members

Constructors

InteractiveBrowserCredentialOptions()

public InteractiveBrowserCredentialOptions()

Properties

AdditionallyAllowedTenants

Specifies tenants in addition to the specified TenantId for which the credential may acquire tokens. Add the wildcard value "*" to allow the credential to acquire tokens for any tenant the logged in account can access. If no value is specified for TenantId, this option will have no effect, and the credential will acquire tokens for any requested tenant.

public IList<string> AdditionallyAllowedTenants { get; }

Property Value

IList<string>

AuthenticationRecord

The AuthenticationRecord captured from a previous authentication.

public AuthenticationRecord AuthenticationRecord { get; set; }

Property Value

AuthenticationRecord

BrowserCustomization

The options for customizing the browser for interactive authentication.

public BrowserCustomizationOptions BrowserCustomization { get; set; }

Property Value

BrowserCustomizationOptions

ClientId

The client ID of the application used to authenticate the user. If not specified the user will be authenticated with an Azure development application.

public string ClientId { get; set; }

Property Value

string

DisableAutomaticAuthentication

Prevents the InteractiveBrowserCredential from automatically prompting the user. If automatic authentication is disabled a AuthenticationRequiredException will be thrown from GetToken(TokenRequestContext, CancellationToken) and GetTokenAsync(TokenRequestContext, CancellationToken) in the case that user interaction is necessary. The application is responsible for handling this exception, and calling Authenticate(CancellationToken) or AuthenticateAsync(CancellationToken) to authenticate the user interactively.

public bool DisableAutomaticAuthentication { get; set; }

Property Value

bool

DisableInstanceDiscovery

Gets or sets the setting which determines whether or not instance discovery is performed when attempting to authenticate. Setting this to true will completely disable both instance discovery and authority validation. This functionality is intended for use in scenarios where the metadata endpoint cannot be reached, such as in private clouds or Azure Stack. The process of instance discovery entails retrieving authority metadata from https://login.microsoft.com/ to validate the authority. By setting this to true, the validation of the authority is disabled. As a result, it is crucial to ensure that the configured authority host is valid and trustworthy."

public bool DisableInstanceDiscovery { get; set; }

Property Value

bool

LoginHint

Avoids the account prompt and pre-populates the username of the account to login.

public string LoginHint { get; set; }

Property Value

string

RedirectUri

Uri where the STS will call back the application with the security token. This parameter is not required if the caller is not using a custom ClientId. In the case that the caller is using their own ClientId the value must match the redirect url specified when creating the application registration.

public Uri RedirectUri { get; set; }

Property Value

Uri

TenantId

The tenant ID the user will be authenticated to. If not specified the user will be authenticated to the home tenant.

public string TenantId { get; set; }

Property Value

string

TokenCachePersistenceOptions

Specifies the TokenCachePersistenceOptions to be used by the credential. If not options are specified, the token cache will not be persisted to disk.

public TokenCachePersistenceOptions TokenCachePersistenceOptions { get; set; }

Property Value

TokenCachePersistenceOptions