Azure.Identity.InteractiveBrowserCredentialOptions
public class InteractiveBrowserCredentialOptions : TokenCredentialOptions, ISupportsTokenCachePersistenceOptions, ISupportsDisableInstanceDiscovery, ISupportsAdditionallyAllowedTenants, ISupportsTenantId
Options to configure the InteractiveBrowserCredential.
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.
The AuthenticationRecord captured from a previous authentication.
The options for customizing the browser for interactive authentication.
The client ID of the application used to authenticate the user. It is recommended that developers register their applications and assign appropriate roles. For more information, visit .
If not specified, users will authenticate to an Azure development application, which is not recommended for production scenarios.
Prevents the InteractiveBrowserCredential from automatically prompting the user. If automatic authentication is disabled a AuthenticationRequiredException will be thrown from GetToken and GetTokenAsync in the case that
user interaction is necessary. The application is responsible for handling this exception, and calling Authenticate or AuthenticateAsync to authenticate the user interactively.
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."
Avoids the account prompt and pre-populates the username of the account to login.
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.
The tenant ID the user will be authenticated to. If not specified the user will be authenticated to the home tenant.
Specifies the TokenCachePersistenceOptions to be used by the credential. If not options are specified, the token cache will not be persisted to disk.
public InteractiveBrowserCredentialOptions()