Partager via


ITokenCacheSerializer.SerializeAdalV3 Method

Definition

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(Byte[]) in addition to SerializeMsalV3()/DeserializeMsalV3(Byte[], Boolean).

See https://aka.ms/adal-to-msal-net/cache for details on how to use this advanced API correctly.

public byte[] SerializeAdalV3 ();
abstract member SerializeAdalV3 : unit -> byte[]
Public Function SerializeAdalV3 () As Byte()

Returns

Byte[]

Byte stream representation of the cache

Remarks

Do not use SerializeAdalV3()/DeserializeAdalV3(Byte[]) without also using SerializeMsalV3()/DeserializeMsalV3(Byte[], Boolean), because only refresh tokens are exported in this format. Your applications will not cache access token and id tokens, and will instead need to get them from the identity provider (AAD), which will eventually throttle you. Later versions of ADAL (4.x and 5.x) use the same cache format as MSAL. Only SerializeMsalV3()/DeserializeMsalV3(Byte[], Boolean) is compatible with other MSAL libraries such as MSAL for Python and MSAL for Java. ADAL to MSAL cache interop is only available for public client scenarios and for web site scenario.

Applies to