Table of Contents

Class TokenCacheRefreshArgs

Namespace
Azure.Identity
Assembly
Azure.Identity.dll

Args sent to TokenCache OnBefore and OnAfter events.

public class TokenCacheRefreshArgs
Inheritance
TokenCacheRefreshArgs
Inherited Members

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.

public bool IsCaeEnabled { get; }

Property Value

bool

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
public string SuggestedCacheKey { get; }

Property Value

string