Token cache serialization Azure AD
Modern authentication with Azure AD for WinForms (native) apps (cmatskas.com)
At this point everything should resolve fine apart from the 'TokenCacheHelper'. That's a special class that we will use to cache our token info locally and avoid prompting the user to login every time!
A custom serialization is needed on .NET Framework and .NET Core
In the case of .NET Framework and .NET core, the libraries also provide a default cache but this only lasts for the duration of the application. To understand why, remember that ADAL .NET desktop/core applications can be Web applications or Web API, which might use some specific cache mechanisms like databases, a Redis cache, etc .... To have a persistent token cache application in .NET Desktop or Core developers need to customize the serialization. The way to do it is different for public client applications and confidential client applications.