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

[Bug] If isSingleTenant() is true, updateOutdatedCachedAccount will compare lower case account keys in msal.account.keys with mixed case homeAccountIds #7445

Open
2 tasks
oliverunger opened this issue Dec 4, 2024 · 0 comments
Labels
adfs Related to ADFS 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: Attention 👋 Awaiting response from the MSAL.js team public-client Issues regarding PublicClientApplications question Customer is asking for a clarification, use case or information.

Comments

@oliverunger
Copy link

oliverunger commented Dec 4, 2024

Core Library

MSAL.js (@azure/msal-browser)

Core Library Version

3.27.0

Wrapper Library

MSAL Angular (@azure/msal-angular)

Wrapper Library Version

None

Public or Confidential Client?

Public

Description

CacheManager#updateOutdatedCachedAccount
If isSingleTenant() returns true the following code is executed

const matchingAccountKeys = this.getAccountKeys().filter(
                (key: string) => {
                    return key.startsWith(accountEntity.homeAccountId);
                }
            );

matchingAccountKeys is [] because getAccountKeys() are in lower case (see: AccountEntity#generateAccountCacheKey)
but accountEntity.homeAccountId must not be in lower case.

Error Message

No response

MSAL Logs

No response

Network Trace (Preferrably Fiddler)

  • Sent
  • Pending

MSAL Configuration

none

Relevant Code Snippets

none

Reproduction Steps

See code above

Expected Behavior

Should return a non-empty list of matchingAccountKeys

Identity Provider

ADFS

Browsers Affected (Select all that apply)

Chrome

Regression

No response

@oliverunger oliverunger added bug-unconfirmed A reported bug that needs to be investigated and confirmed question Customer is asking for a clarification, use case or information. labels Dec 4, 2024
@github-actions github-actions bot added adfs Related to ADFS msal-angular Related to @azure/msal-angular package msal-browser Related to msal-browser package public-client Issues regarding PublicClientApplications labels Dec 4, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Attention 👋 Awaiting response from the MSAL.js team label Dec 4, 2024
@oliverunger oliverunger changed the title [Bug] If no tenentProfiles given, updateOutdatedCachedAccount will compare lower case account keys in msal.account.keys with mixed case homeAccountIds [Bug] If tenantProfiles is non-empty, updateOutdatedCachedAccount will compare lower case account keys in msal.account.keys with mixed case homeAccountIds Dec 4, 2024
@oliverunger oliverunger changed the title [Bug] If tenantProfiles is non-empty, updateOutdatedCachedAccount will compare lower case account keys in msal.account.keys with mixed case homeAccountIds [Bug] If tenantProfiles is undefined, updateOutdatedCachedAccount will compare lower case account keys in msal.account.keys with mixed case homeAccountIds Dec 4, 2024
@oliverunger oliverunger changed the title [Bug] If tenantProfiles is undefined, updateOutdatedCachedAccount will compare lower case account keys in msal.account.keys with mixed case homeAccountIds [Bug] If isSingleTenant() is true, updateOutdatedCachedAccount will compare lower case account keys in msal.account.keys with mixed case homeAccountIds Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adfs Related to ADFS 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: Attention 👋 Awaiting response from the MSAL.js team public-client Issues regarding PublicClientApplications question Customer is asking for a clarification, use case or information.
Projects
None yet
Development

No branches or pull requests

1 participant