Blocking token cache operations prevent async patterns
7/10 HighThe TokenCache API in MSAL.NET uses void-returning event handlers for load/persist operations, forcing synchronous calls to distributed caches. This blocks threads and can cause application crashes under high load in ASP.NET Core applications, as async cache APIs cannot be leveraged.
Sources
Collection History
Query: “What are the most common pain points with MSAL for developers in 2025?”4/7/2026
The handler methods must return void. What this means is that we cannot use asynchronous APIs to load and persist data in token caches. In ASP.NET Core applications with enough requests coming in, this could actually lead to the application going down and requiring a server restart to recover.
Created: 4/7/2026Updated: 4/7/2026