If you’re working with secure web applications with Azure Active Directory, you’re probably working with ADAL. ADAL has its own Token Cache (wonderfully explained in this post from the father of ADAL, Vittorio Bertocci. The Token Cache included in ADAL, it’s only suitable for native applications because it works “in memory”, so this will be a problem sooner or later for web applications. Fortunately, with ADAL v2, we can implement our own token cache, just inheriting from the TokenCache class. In fact, there’re a couple of examples in the same post of Vittorio, and one of them is based on SQL Server with Entity Framework. Therefore, it can be used perfectly for web applications.