After loginRedirect success, no active account exists #5155
Labels
answered
Question has received "first qualified response"
b2c
Related to Azure B2C library-specific issues
bug-unconfirmed
A reported bug that needs to be investigated and confirmed
msal-angular
Related to @azure/msal-angular package
msal-browser
Related to msal-browser package
Needs: Author Feedback
Awaiting response from issue author
no-issue-activity
Issue author has not responded in 5 days
public-client
Issues regarding PublicClientApplications
question
Customer is asking for a clarification, use case or information.
Core Library
MSAL.js v2 (@azure/msal-browser)
Core Library Version
2.28.1
Wrapper Library
MSAL Angular (@azure/msal-angular)
Wrapper Library Version
2.4.1
Public or Confidential Client?
Public
Description
After successfully logging with AD B2C using the
loginRedirect
method and getting redirected back to the SPA, MSAL is unable to retrieve the active account of the user. So ultimately the login fails.Following the documentation for using
loginRedirect
withmsal-angular
: https://docs.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-angular-auth-codeSteps to reproduce:
MsalService.loginRedirect()
)LOGIN_SUCCESS
event on the component that is the redirectUri. For exampleLOGIN_SUCCESS
events receives an event message on login success - but there isn't. ThegetActiveAccount
method returnsnull
.Notes:
MsalService.loginPopup
method, so the configuration of the SPA shouldn't be an issue. However, there are currently blocking bugs with the loginPopup flow, as it doesn't work with MacOS in full-screen mode and there are also reports of the flow not working on iOS, so that's currently not usable. Issues: Login popup flow does not work for full-screen browsers #5123 popup flow broken in full-screen macOS #4921msal-browser
where after a successful AD B2C login there is no active account, and thus the login fails. That's essentially the same behavior that is happening here, just different code. That is documented in this unresolved issue: Unable to acquire token silently after B2C login and redirection to SPA redirectUri #4935msal-browser
to work, then loginPopup withmsal-angular
, and nowmsal-angular
with loginRedirect. We've experienced unresolved issues for all these MSAL B2C flows.Error Message
No error messages, but the user is not successfully logged in with an active account after a successful
loginRedirect
andMsal Logs
No response
MSAL Configuration
Relevant Code Snippets
Reproduction Steps
see description
Expected Behavior
on the
LOGIN_SUCCESS
event, you should be able to retrieve an active account and be successfully logged in.the
MsalService.getActiveAccount
method should not benull
Identity Provider
Azure B2C Basic Policy
Browsers Affected (Select all that apply)
Chrome
Regression
No response
Source
External (Customer)
The text was updated successfully, but these errors were encountered: