AcquireTokenOnBehalfOfParameterBuilder.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 token cache. By default the token is taken from the the user token cache (forceRefresh=false)

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

Parameters

forceRefresh
Boolean

If true, ignore any access token in the user token cache and attempt to acquire new access token using the refresh token for the account if one is available. 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 issue too many similar token requests.

Applies to