TokenCache.DeserializeMsalV2(Byte[]) Method

Definition

Deserializes parts of 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, use both SerializeAdalV3()/DeserializeAdalV3(Byte[]) and SerializeMsalV2()/DeserializeMsalV2(Byte[]).

public void DeserializeMsalV2 (byte[] bytes);
member this.DeserializeMsalV2 : byte[] -> unit
Public Sub DeserializeMsalV2 (bytes As Byte())

Parameters

bytes
Byte[]

Byte stream representation of the cache

Remarks

An application using ADAL should not rely exclusively on SerializeMsal* / DeserializeMsal* because access tokens and ID tokens will be lost, as they are not compatible between ADAL and MSAL. This will cause ADAL to contact AAD for an access token on every AcquireTokenSilent call, introducing seconds of delay into your app.

Applies to