Partager via


AppServicesAuthenticationTokenAcquisition.ReplyForbiddenWithWwwAuthenticateHeaderAsync Method

Definition

Used in web APIs (which therefore cannot have an interaction with the user). Replies to the client through the HttpResponse by sending a 403 (forbidden) and populating wwwAuthenticateHeaders so that the client can trigger an interaction with the user so the user can consent to more scopes.

public System.Threading.Tasks.Task ReplyForbiddenWithWwwAuthenticateHeaderAsync (System.Collections.Generic.IEnumerable<string> scopes, Microsoft.Identity.Client.MsalUiRequiredException msalServiceException, Microsoft.AspNetCore.Http.HttpResponse? httpResponse = default);
abstract member ReplyForbiddenWithWwwAuthenticateHeaderAsync : seq<string> * Microsoft.Identity.Client.MsalUiRequiredException * Microsoft.AspNetCore.Http.HttpResponse -> System.Threading.Tasks.Task
override this.ReplyForbiddenWithWwwAuthenticateHeaderAsync : seq<string> * Microsoft.Identity.Client.MsalUiRequiredException * Microsoft.AspNetCore.Http.HttpResponse -> System.Threading.Tasks.Task
Public Function ReplyForbiddenWithWwwAuthenticateHeaderAsync (scopes As IEnumerable(Of String), msalServiceException As MsalUiRequiredException, Optional httpResponse As HttpResponse = Nothing) As Task

Parameters

scopes
IEnumerable<String>

Scopes to consent to.

msalServiceException
MsalUiRequiredException

MsalUiRequiredException triggering the challenge.

httpResponse
HttpResponse

The HttpResponse to update.

Returns

A Task representing the asynchronous operation.

Implements

Applies to