[Bug] Microsoft.Identity.Client 4.37.0 InMemoryPartitionedAppTokenCacheAccessor.SaveIdToken throws NotSupportedException #2987
Labels
bug
P1
regression
Behavior that worked in a previous release that no longer works in a newer release
requires more info
Projects
Which version of MSAL.NET are you using?
Microsoft.Identity.Client 4.37.0
Platform
.NET 4.7.2
What authentication flow has the issue?
During
AcquireTokenForClient
for a confidential client app.Is this a new or existing app?
a. The app is in production, and I have upgraded to a new version of MSAL.
Repro
Expected behavior
An access token is retrieved.
Actual behavior
InMemoryPartitionedAppTokenCacheAccessor.SaveIdToken throws a NotSupportedException.
Additional context / logs / screenshots
The regression occurred when updating the Microsoft.Identity.Client NuGet from 4.35.1 to 4.37.0. It seems that version 4.37.0 also introduced a partitioned user cache (#2881). The source code has a comment explaining that InMemoryPartitionedAppTokenCacheAccessor.SaveIdToken throws a NotSupportedException because for the app token cache, there are no ID tokens in a client credential flow:
microsoft-authentication-library-for-dotnet/src/client/Microsoft.Identity.Client/PlatformsCommon/Shared/InMemoryPartitionedAppTokenCacheAccessor.cs
Lines 77 to 84 in eb81652
Partial stack trace:
The text was updated successfully, but these errors were encountered: