Sdílet prostřednictvím


AcquireTokenOnBehalfOfParameterBuilderExtensions.WithSearchInCacheForLongRunningProcess Method

Definition

Only affects InitiateLongRunningProcessInWebApi(IEnumerable<String>, String, String). When enabled, mimics MSAL 4.50.0 and below behavior - checks in cache for cached tokens first, and if not found, then uses user assertion to request new tokens from AAD. When disabled (default behavior), doesn't search in cache, but uses the user assertion to retrieve tokens from AAD.

public static Microsoft.Identity.Client.AcquireTokenOnBehalfOfParameterBuilder WithSearchInCacheForLongRunningProcess (this Microsoft.Identity.Client.AcquireTokenOnBehalfOfParameterBuilder builder, bool searchInCache = true);
static member WithSearchInCacheForLongRunningProcess : Microsoft.Identity.Client.AcquireTokenOnBehalfOfParameterBuilder * bool -> Microsoft.Identity.Client.AcquireTokenOnBehalfOfParameterBuilder
<Extension()>
Public Function WithSearchInCacheForLongRunningProcess (builder As AcquireTokenOnBehalfOfParameterBuilder, Optional searchInCache As Boolean = true) As AcquireTokenOnBehalfOfParameterBuilder

Parameters

searchInCache
Boolean

Whether to search in cache.

Returns

The builder to chain the .With methods

Remarks

This method should only be used in specific cases for backwards compatibility. For most cases, rely on the default behavior of InitiateLongRunningProcessInWebApi(IEnumerable<String>, String, String) and AcquireTokenInLongRunningProcess(IEnumerable<String>, String) described in https://aka.ms/msal-net-long-running-obo .

Applies to