question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enable multi user access in silent-flow to be able to use server with different accounts parallel

See original GitHub issue

Library

  • msal@1.x.x or @azure/msal@1.x.x
  • @azure/msal-browser@2.x.x
  • @azure/msal-node@1.x.x
  • @azure/msal-react@1.x.x
  • @azure/msal-angular@0.x.x
  • @azure/msal-angular@1.x.x
  • @azure/msal-angular@2.x.x
  • @azure/msal-angularjs@1.x.x

Framework

  • Angular
  • React
  • Other

Expected behavior

Multi user access possible.

Identity Provider

  • Azure AD
  • Azure B2C Basic Policy
  • Azure B2C Custom Policy
  • ADFS
  • Other

Browsers/Environment

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

Regression

  • Did this behavior work before? Version:

Security

  • Is this issue security related?

Source

  • Internal (Microsoft)
  • Customer request

Description

The silent-flow example works perfectly. I can login and logout.

But when I try to login in 2 different browsers with 2 different accounts. Then the old browser will be logged in with the last logged-in account when page was reloaded.

grafik

I know that it always takes the last homeAccountId from cache as the code says:

const account = await msalTokenCache.getAccountByHomeId(app.locals.homeAccountId);

My question is now, how to enable multi users? How to rewrite the app.locals? Is there any example?

Otherwise is need to create some custom code for that?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
pkanher617commented, Mar 5, 2021

@kwoxer If you need to get all of the accounts currently tracked by msal-node, you can use the getAllAccounts API exposed on the token cache. However this does mean that your app has to have some way to choose or identify which account you are using. You could do this by presenting an account selection screen to the user.

app.locals.homeAccountId is set when the response is retrieved from acquireTokenByCode so that is why it is always taking the last homeAccountId.

0reactions
github-actions[bot]commented, May 7, 2021

This issue has been closed due to inactivity. If this has not been resolved please open a new issue. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enable multi user access in silent-flow to be able to use server ...
I know that it always takes the last homeAccountId from cache as the code says: const account = await msalTokenCache.getAccountByHomeId(app.
Read more >
Multi user login - Parallels Forums
Hi, is it possible to offer parallel logins with different usernames? Accessing a mac always results in a login for a specific user....
Read more >
How can I enable multiple users login at a time in remote ...
Log into the server and open MMC.exe. · File → Add/Remove Snap-in → Group Policy Object → Add → Finish → OK. ·...
Read more >
How to allow multiple user login on Server which is on ...
1 Answer ... On a server in a workgroup you need Per-Device RDS CAL. You can't use the wizard, you need to add...
Read more >
Enabling multiple users to work simultaneously on the ... - IBM
You can configure datastores to allow multiple users to work on them simultaneously. Enabling this option requires users to explicitly lock a subscription ......
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