AppServicesAuthenticationTokenAcquisition.ReplyForbiddenWithWwwAuthenticateHeaderAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.