[Bug] pca.GetAccountsAsync() decides to include another account
See original GitHub issueWhich version of MSAL.NET are you using? Microsoft.Identity.Client v4.31.0
Platform .NET 4.6.1 WPF Desktop
What authentication flow has the issue?
- Desktop / Mobile
- Silent
Is this a new or existing app? b. The app is in production, I haven’t upgraded MSAL, but started seeing this issue.
Repro
https://github.com/RhomGit/MSALDesktopRepro
var accounts = await pca.GetAccountsAsync();
Expected behavior Removing all accounts and/or deleting msalcache.bin3 file would remove all accounts. Subsequent logins only would be remembered.
Actual behavior After an unspecified period of time, maybe an hour, GetAccountsAsync() return multiple accounts for some reason, despite the second account never being used by the app.
Additional context / logs / screenshots The account that is being added isn’t my Windows user, nor is it any of my logged in Office365 accounts/Edge browser/Visual Studio accounts. The only app logged in with this account is Teams? The timing seems to coincide with the very recent Windows 10 update.
This occurs in our production app and also occurs in the repro app linked above. I’d say maximum 7 days since I noticed it, probably less and I auth via MSAL every day.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
@RhomGit - could you email me your app coordinates (client_id, tenant, b2c hostname etc)? bogavril at microsoft com And also could you clarify what accounts are used to login? Are these local accounts or Facebook / Google / other accounts?
And yes, I have my own secure APIs using the scopes you mentioned and Azure EasyAuth.