getAllAccounts() returns an empty array

See original GitHub issue

Library

  • msal@1.x.x or @azure/msal@1.x.x
  • [x ] @azure/msal-browser@2.4.1 and UP
  • @azure/msal-angular@0.x.x
  • @azure/msal-angular@1.x.x
  • @azure/msal-angularjs@1.x.x

Important: Please fill in your exact version number above, e.g. msal@1.1.3.

Framework

VueJs

Description

getAllAccounts() returns an empty array when using version 2.4.1 and up, the token request return the user nothing to note, about it. i attached a Gif hopping it describe the issue better msal

Error Message

No error merssage

Security

  • Is this issue security related?

Regression

  • [X ] Did this behavior work before? Version: 2.4.0

MSAL Configuration

auth: {
        clientId: XX,
        authority: XXX,
        knownAuthorities: XXX,
        redirectUri: "http://localhost:8081/auth/callback",
        postLogoutRedirectUri: 'http://localhost:8081',
        validateAuthority: false
    }

Reproduction steps

// Provide relevant code snippets here.
// For Azure B2C issues, please include your policies.

Expected behavior

should return an array of logged in users, same that happens on version 2.4.0

Browsers/Environment

  • [x ] Chrome
  • [x ] Firefox
  • Edge
  • Safari
  • IE
  • Other (Please add browser name here)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
sameeragcommented, Nov 4, 2020

#2516 should be merged soon. The wait is on unit tests and we have them ready now.

2reactions
pkanher617commented, Nov 4, 2020

Taking a look at this today, thanks for your patience.

Read more comments on GitHub >

github_iconTop Results From Across the Web

getAllAccounts returns an empty array · Issue #2615 - GitHub
I am trying to implement a global AuthProvider to supply the username, email address and token to any page regardless and force authentication, ......
Read more >
How do I know that I already single sign-on in angular ...
getAllAccounts() : returns all the accounts currently in the cache. An application must choose an account to acquire tokens silently.
Read more >
PublicClientApplication | microsoft-authentication-libraries-for-js
Returns all accounts that MSAL currently has data for. (the account object is created at the time of successful login) or empty array...
Read more >
AzureAD/microsoft-authentication-library-for-js msal-common-v1.1.0 ...
Decode state from URI Encoding before comparing (#2049); getAllAccounts() returns empty array instead of null (#2059); Updated the UrlString.
Read more >
Enable authentication in an Angular application by using ...
The getAllAccounts() method returns one or more objects. TypeScript ... The method then adds the claims to the dataSource array.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found