Skip to content

[Bug] WithAdditionalCacheParameters fails to persist when cache is serialized #5261

@trwalke

Description

@trwalke

Library version used

4.71.1

.NET version

net 462 -> net 8.0

Scenario

ConfidentialClient - service to service (AcquireTokenForClient)

Is this a new or an existing app?

None

Issue description and reproduction steps

When setting a serialized cache and using the WithAdditionalCacheParameters api, the persisted cache parameters are lost after attempting to acquire them from the cache on the second authentication attempt

Expected behavior

MSAL should return the persisted parameters from the serialized cache

Identity provider

Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)

Regression

No response

Solution and workarounds

Update the JSON logic in the MsalAccessTokenCacheItem to store the PersistedCacheParameters collection in the serialized JSON.

Metadata

Metadata

Assignees

Type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions