CacheOptions.UseSharedCache Property

Definition

Share the cache between all ClientApplication objects. The cache becomes static. Defaults to false.

C#
public bool UseSharedCache { get; set; }

Property Value

Remarks

Recommended only for client credentials flow (service to service communication). Web apps and Web APIs should use external token caching (Redis, Cosmos etc.) for scaling purposes. Desktop apps should encrypt and persist their token cache to disk, to avoid losing tokens when app restarts. ADAL used a static cache by default.

Applies to

Produto Versións
Microsoft Authentication Library for .NET (MSAL.NET) latest