Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSAL B2C failing to retrieve cached accounts of external users #2073

Open
manzielyse opened this issue Apr 12, 2024 · 0 comments
Open

MSAL B2C failing to retrieve cached accounts of external users #2073

manzielyse opened this issue Apr 12, 2024 · 0 comments

Comments

@manzielyse
Copy link

Describe the bug
I am building an app that uses MSAL B2C to authenticate users. Getting a token interactively works as expected for all users but getting a token silently fails only for external users (Guests) but for members of the tenant I can get a token silently.

Smartphone (please complete the following information):

  • Device: Pixel 6a, Pixel 7 Pro
  • Android Version: 14
  • Browser default
  • MSAL Version 5.2.1

Stacktrace

2024-04-12 10:26:32.997 MsalOAuth2...getAccount W [2024-04-12 08:26:32 - thread_name: pool-12-thread-2, correlation_id: UNSET - Android 34] No matching account found.
2024-04-12 10:26:33.008 SilentToke...Parameters W [2024-04-12 08:26:33 - thread_name: pool-18-thread-4, correlation_id: 93f25388-d565-4fce-b626-4250bebf3bb6 - Android 34] The account set on silent operation parameters is NULL.
2024-04-12 10:26:33.010 System.out I Error: com.microsoft.identity.client.exception.MsalClientException: No cached accounts found for the supplied homeAccountId and clientId

To Reproduce
Steps to reproduce the behavior:
Invite guest user to tenant and login using b2c configuration.

If related to user experience, use the format:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

If related to development, please provide relevant configuration details necessary to understand your problem including any relevant traces, logs, or otherwise.

Expected behavior
Expected to get access token silently / automatically

Actual Behavior
Fails with error "Error: com.microsoft.identity.client.exception.MsalClientException: No cached accounts found for the supplied homeAccountId and clientId"

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Please note: Do not include sensitive information like PII, OII, credentials, secrets, and tokens.

For privacy/security issues please see instructions here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant