[Bug] Editing and saving profile clears cached accounts
See original GitHub issueWhich Version of MSAL are you using ? Microsoft.Identity.Client 4.18.0
Platform .NET Standard 2.0, .NET Framework 4.6.1, WPF
What authentication flow has the issue?
- Desktop / Mobile
- Interactive B2C
Is this a new or existing app? The app is in production but updated MSAL version and changed areas of code and are now re-testing.
Repro
var ar = await pca.AcquireTokenInteractive(this.scopes)
.WithAccount(account)
.WithB2CAuthority(AuthB2C.AuthorityEditProfile)
.WithParentActivityOrWindow(parentActivity)
.WithPrompt(Prompt.NoPrompt)
.ExecuteAsync();
Expected behavior Saving a profile, closing my app and then restarting will remember the cached user and allow AcquireTokenSilent to succeed.
Actual behavior
var accounts = await pca.GetAccountsAsync();
Saving a profile, close my app. Restart and try and get the accounts via the call above but they are empty. Requires the user to reauth via AcquireTokenInteractive.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
"Cached Credentials Have Expired. Please Sign In" error - ...
Quit all Office apps. Go to Control Panel>User Accounts>Credential Manager>Windows Credentials>Generic Credentials>remove all credentials ...
Read more >Cached domain logon information - Windows Server
Through the Registry Editor or a Registry Console Tool (reg.exe), you can change the number of previous logon attempts that a server will...
Read more >Office 365 cached credentials : r/sysadmin
Any Microsoft account saved in the windows settings ... Office 365 Client Deployment wizard, getting this error now when trying to open the ......
Read more >How can I clear cached domain credentials?
David Yu's answer is pretty much on-target, but there is a way to do this without editing the registry directly.
Read more >Incorrect login user is remembered and cannot be removed
Issue Type: Bug My employer has an Azure SQL DB. ... Simplest fix: tell me where/how I can delete saved credentials from ADS....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I honestly couldn’t tell you as it has been such a long time (more than a year at the very least). Its a feature that you add in and then never test again until a user reports an issue (or a developer misclicks “Sign Out” and then recognises an issue hehe).
Hi Jenny,
this particular issue is on Windows desktop (I haven’t tested other platforms). The iOS bit is in there because I share the MSAL portion of my code across many projects (including a Xamarin Forms mobile app) … and yes, I need to update the keychain group to my own 😉