microsoft-authentication-library-for-dotnet: [Bug] Edit Profile is asking user to log in
Which 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 If the existing token has been acquired silently then the Window should go directly to the Edit Profile section.
Actual behavior If the existing token has been acquired silently then the UI asks for user to authenticate before proceeding to the Edit Profile section. Note: it works correctly if the current token has been retrieved via AcquireTokenInteractive (i.e. does not ask the user to authenticate).
Additional context/ Logs / Screenshots Previous similar issue: https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/505
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 21 (1 by maintainers)
@Coder-RKV you can open a new issue w/exactly what the issue is & provide a repro. thanks.
@RhomGit not a waste of time at all. we recently did work in a related area, so it was good to triple check we didn’t have any issues there. I really appreciate the repro and quick responses from you. very helpful. if anything else comes up, let us know.
Also, @jmprieur and I realized this is not very well documented, not from us, nor B2C, so something we can improve for sure.
There was no sign out function and silent failure wasn’t handled nicely so I have pushed an update.
So the steps for repro would be:
Hi Jenny, I have quickly thrown together a repro here: https://github.com/RhomGit/MSALDesktopRepro Its really rough, sorry.
The buttons on the right, click in this order: Create Auth, Silent and then Edit Profile.
Hi Jenny,
the original code used a Helpers class for “GetAccountByPolicy”. Please find it all below: