Partilhar via


MicrosoftIdentityConsentAndConditionalAccessHandler.ChallengeUser Method

Definition

Forces the user to consent to specific scopes and perform Conditional Access to get specific claims. Use on a Razor/Blazor page or controller to proactively ensure the scopes and/or claims before acquiring a token. The other mechanism HandleException(Exception) ensures claims and scopes requested by Azure AD after a failed token acquisition attempt. See https://aka.ms/ms-id-web/ca_incremental-consent for details.

public void ChallengeUser (string[]? scopes, string? claims = default, string? userflow = default);
member this.ChallengeUser : string[] * string * string -> unit
Public Sub ChallengeUser (scopes As String(), Optional claims As String = Nothing, Optional userflow As String = Nothing)

Parameters

scopes
String[]

Scopes to request.

claims
String

Claims to ensure.

userflow
String

Userflow being invoked for AAD B2C.

Applies to