Delen via


TokenCacheRefreshArgs Class

Definition

Args sent to TokenCache OnBefore and OnAfter events.

public class TokenCacheRefreshArgs
type TokenCacheRefreshArgs = class
Public Class TokenCacheRefreshArgs
Inheritance
TokenCacheRefreshArgs

Properties

IsCaeEnabled

Whether or not the cache is enabled for CAE. Note that this value should be used as an indicator for how the cache will be partitioned. Token cache refresh events with this value set to true will originate from a different cache instance than those with this value set to false.

SuggestedCacheKey

A suggested token cache key, which can be used with general purpose storage mechanisms that allow storing key-value pairs and key based retrieval. Useful in applications that store one token cache per user, the recommended pattern for web apps.

The value is:

  • homeAccountId for AcquireTokenSilent, GetAccount(homeAccountId), RemoveAccount and when writing tokens on confidential client calls
  • "{clientId}__AppTokenCache" for AcquireTokenForClient
  • "{clientId}_{tenantId}_AppTokenCache" for AcquireTokenForClient when using a tenant specific authority
  • the hash of the original token for AcquireTokenOnBehalfOf

Applies to