@azure/msal-browser: 2.11.0 :- Getting account object NULL after calling login

Harshal Wankhade 0 Reputation points
2023-08-14T10:54:06.19+00:00

From consuming application, we are calling

_msalAgent.loginRedirect()

It is prompting user to put i credentials

Once that is complete we are checking the accounts using below call

_msalAgent.getAllAccounts()

But this call is sometimes returning the active accounts, but sometimes returning NULL

This is working intermittently and the code is deployed into aks containers

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. James Hamil 27,221 Reputation points Microsoft Employee Moderator
    2023-08-14T23:04:28.68+00:00

    Hi @Harshal Wankhade , this is usually caused by browser-related issues. Please check the following for me:

    1. Check if the issue persists across different browsers. If it's specific to a certain browser, consider allowing popups or adjusting the browser's settings related to storage.
    2. Ensure that you have properly registered a callback for success or error through the handleRedirectCallback() method.
    3. If your application is deployed in Azure Kubernetes Service (AKS) containers, you can use the AKS Diagnose and Solve Problems tool to identify and resolve problems in your cluster.

    Please let me know if you have any questions and I can help you further.

    If this answer helps you please mark "Accept Answer" so other users can reference it.

    Thank you,

    James


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.