<PackageReference Include="Microsoft.Identity.Client" Version="4.83.1" />

Microsoft.Identity.Client.ITokenCacheSerializer

public interface ITokenCacheSerializer
This interface will be available in TokenCacheNotificationArgs callback to enable serialization/deserialization of the cache.
void DeserializeAdalV3(byte[] adalV3State)

Deserializes a part of the token cache - the refresh tokens - to the ADAL.NET 3.x cache format. This API should only be used to maintain SSO between an application using ADAL 3.x and this application using MSAL 3.x or later. Use SerializeAdalV3/ DeserializeAdalV3 in addition to SerializeMsalV3/ DeserializeMsalV3. See https://aka.ms/adal-to-msal-net/cache for details on how to use this advanced API correctly.

void DeserializeMsalV2(byte[] msalV2State)

Deserializes the token cache to the MSAL.NET 2.x cache format, which is compatible with ADAL.NET v4 and other MSAL.NET v2 applications. If you need to maintain SSO between an application using ADAL 3.x or MSAL 2.x and this application using MSAL 3.x, you might also want to serialize and deserialize with SerializeAdalV3/ DeserializeAdalV3 or SerializeMsalV2/ DeserializeMsalV2, otherwise just use SerializeMsalV3/ DeserializeMsalV3.

void DeserializeMsalV3(byte[] msalV3State, bool shouldClearExistingCache = false)

Deserializes the token cache to the MSAL.NET 3.x cache format, which is compatible with other MSAL desktop libraries, including MSAL.NET 4.x, MSAL for Python and MSAL for Java. If you need to maintain SSO between an application using ADAL 3.x and this application using MSAL 3.x or later, you might also want to serialize and deserialize with SerializeAdalV3/ DeserializeAdalV3, otherwise just use SerializeMsalV3/ DeserializeMsalV3.

byte[] SerializeAdalV3()

Serializes a part of the token cache - the refresh tokens - to the ADAL.NET 3.x cache format. If you need to maintain SSO between an application using ADAL 3.x and this application using MSAL 3.x or later, use SerializeAdalV3/ DeserializeAdalV3 in addition to SerializeMsalV3/ DeserializeMsalV3. See https://aka.ms/adal-to-msal-net/cache for details on how to use this advanced API correctly.

byte[] SerializeMsalV2()

Serializes the token cache to the MSAL.NET 2.x unified cache format, which is compatible with ADAL.NET v4 and other MSAL.NET v2 applications. If you need to maintain SSO between an application using ADAL 3.x or MSAL 2.x and this application using MSAL 3.x, you might also want to serialize and deserialize with SerializeAdalV3/ DeserializeAdalV3 or SerializeMsalV2/ DeserializeMsalV2, otherwise just use SerializeMsalV3/ DeserializeMsalV3.

byte[] SerializeMsalV3()

Serializes the token cache to the MSAL.NET 3.x cache format, which is compatible with other MSAL desktop libraries, including MSAL.NET 4.x, MSAL for Python and MSAL for Java. If you need to maintain SSO between an application using ADAL 3.x and this application using MSAL 3.x or later, you might also want to serialize and deserialize with SerializeAdalV3/ DeserializeAdalV3, otherwise just use SerializeMsalV3/ DeserializeMsalV3.