Struct Prompt
Structure containing static members that you can use to specify how the interactive overrides of AcquireTokenAsync in IPublicClientApplication should prompt the user.
public struct Prompt
- Inherited Members
Fields
Consent
The user will be prompted to consent, even if consent was granted before. It is achieved
by sending prompt=consent
to the authorization server's authorize endpoint.
public static readonly Prompt Consent
Field Value
Create
AcquireToken will send prompt=create
to the authorization server's authorize endpoint
which would trigger a sign-up experience, used for External Identities.
public static readonly Prompt Create
Field Value
Remarks
More details at https://aka.ms/msal-net-prompt-create.
ForceLogin
The user will be prompted for credentials by the service. It is achieved
by sending prompt=login
to the authorize endpoint.
public static readonly Prompt ForceLogin
Field Value
NoPrompt
Let the identity service decide on the best user experience, based on browser cookies and on the login hint, which can be specified using WithAccount() or WithLoginHint()
public static readonly Prompt NoPrompt
Field Value
Remarks
This is the recommended prompt
SelectAccount
AcquireToken will send prompt=select_account
to the authorization server's authorize endpoint.
which would present to the user a list of accounts from which one can be selected for
authentication.
public static readonly Prompt SelectAccount
Field Value
Remarks
This is the default prompt for backwards compatibility reasons. Please use NoPrompt for the best user experience.
Methods
Equals(object)
Equals method override to compare Prompt structs
public override bool Equals(object obj)
Parameters
obj
objectobject to compare against
Returns
- bool
true if object are equal.
GetHashCode()
Override to compute hash code
public override int GetHashCode()
Returns
- int
hash code of the PromptValue
Operators
operator ==(Prompt, Prompt)
Operator overload to check equality
public static bool operator ==(Prompt x, Prompt y)
Parameters
Returns
- bool
true if the objects are equal
operator !=(Prompt, Prompt)
Operator overload to check inequality
public static bool operator !=(Prompt x, Prompt y)
Parameters
Returns
- bool
true if the objects are not equal