AcquireTokenParameterBuilderExtensions.WithCachePartitionKey<T> 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.
Adds a key-value pair to the token cache key without sending it as a query parameter.
Use this to partition cached tokens (e.g., isolating short-lived sessions from regular
sessions for the same user). Both AcquireTokenByAuthorizationCode and
AcquireTokenSilent must use the same partition key to match cached entries.
public static T WithCachePartitionKey<T>(this Microsoft.Identity.Client.BaseAbstractAcquireTokenParameterBuilder<T> builder, string key, string value) where T : Microsoft.Identity.Client.BaseAbstractAcquireTokenParameterBuilder<T>;
static member WithCachePartitionKey : Microsoft.Identity.Client.BaseAbstractAcquireTokenParameterBuilder<'T (requires 'T :> Microsoft.Identity.Client.BaseAbstractAcquireTokenParameterBuilder<'T>)> * string * string -> 'T (requires 'T :> Microsoft.Identity.Client.BaseAbstractAcquireTokenParameterBuilder<'T>)
<Extension()>
Public Function WithCachePartitionKey(Of T As BaseAbstractAcquireTokenParameterBuilder(Of T)) (builder As BaseAbstractAcquireTokenParameterBuilder(Of T), key As String, value As String) As T
Type Parameters
- T
Parameters
The builder to chain .With methods.
- key
- String
The partition key name.
- value
- String
The partition key value.
Returns
The builder to chain .With methods.