Udostępnij za pośrednictwem


AcquireTokenForClientParameterBuilder.WithForceRefresh(Boolean) Method

Definition

Specifies if the client application should ignore access tokens when reading the token cache. New tokens will still be written to the application token cache. By default the token is taken from the application token cache (forceRefresh=false)

public Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder WithForceRefresh (bool forceRefresh);
member this.WithForceRefresh : bool -> Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder
Public Function WithForceRefresh (forceRefresh As Boolean) As AcquireTokenForClientParameterBuilder

Parameters

forceRefresh
Boolean

If true, the request will ignore cached access tokens on read, but will still write them to the cache once obtained from the identity provider. The default is false

Returns

The builder to chain the .With methods

Remarks

Do not use this flag except in well understood cases. Identity providers will throttle clients that make too many similar token requests.

Applies to