Udostępnij za pośrednictwem


AcquireTokenForManagedIdentityParameterBuilder.WithClaims(String) Method

Definition

Adds a claims challenge to the token request. The SDK will bypass the token cache when a claims challenge is specified. Retry the token acquisition, and use this value in the WithClaims(String) method. A claims challenge typically arises when calling the protected downstream API, for example when the tenant administrator revokes credentials. Apps are required to look for a 401 Unauthorized response from the protected api and to parse the WWW-Authenticate response header in order to extract the claims. See https://aka.ms/msal-net-claim-challenge for details.

public Microsoft.Identity.Client.AcquireTokenForManagedIdentityParameterBuilder WithClaims (string claims);
member this.WithClaims : string -> Microsoft.Identity.Client.AcquireTokenForManagedIdentityParameterBuilder
Public Function WithClaims (claims As String) As AcquireTokenForManagedIdentityParameterBuilder

Parameters

claims
String

A string with one or multiple claims.

Returns

The builder to chain .With methods.

Applies to