Logs and Network traces
Without logs or traces, it is unlikely that the team can investigate your issue. Capturing logs and network traces is described at https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/logging
Which Version of MSAL are you using ?
4.17.1
Platform
.net, .net core
What authentication flow has the issue?
Other? - please describe;
Is this a new or existing app?
Visual studio
Repro
1) Have a user in multiple tenants where in one of the tenants the user is disabled.
2) Have an account with a short refresh token lifetime where an expired token message is sent from the server with a bad_token sub error
Expected behavior
Account should remain in the cache, but silent token acquisition attempts should throw an exception
Actual behavior
Account is deleted from the MSAL cache causing a cascading delete in VS.
@trwalke - we need to agree on how to handle "bad_token" suberror with the other MSAL teams, so marking this as blocked.
ok, thanks @bgavrilMS
ill look at something else
We need to remove special handling of "bad_token" status until we can reach consensus of how to properly handle this.
Work to do:
suberror is "bad_token" to avoid unnecessary calls to AzureAD). The PR was https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/pull/1720 related to issue https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/1505This is included in MSAL 4.25.0 release.
Most helpful comment
Work to do:
suberroris "bad_token" to avoid unnecessary calls to AzureAD). The PR was https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/pull/1720 related to issue https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/1505