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

Fixing the condition of throwing missingTenantIdError (#7528) #7530

Draft
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

star-starry-sea
Copy link

Hello.
The PR is created to fix the issue #7528.
In the PR, I change the condition of throwing missingTenantIdError to make it conform to the annotation description and meet the actual usage needs (acquireTokenByClientCredential) when the Azure application option is only for individual tenants.

@github-actions github-actions bot added the msal-node Related to msal-node package label Jan 25, 2025
@star-starry-sea
Copy link
Author

@microsoft-github-policy-service agree

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Attention 👋 Awaiting response from the MSAL.js team label Feb 17, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs: Attention 👋 Awaiting response from the MSAL.js team label Feb 17, 2025
@star-starry-sea
Copy link
Author

Anyone who can have a look at it please?

@devopsbob
Copy link

Some review comments and ideas to consider.
Drops third case described in line 61 for any-of-combination by dropping "or consumers". Requires design knowledge I would say. It would seem to me a common or organization may also have sub-tenants or that a tenant is not otherwise known to the vast ADFS->Entra federation and exists only as a registered tenant. Would this test check cause potential leak of valid tenant ids whos definition has no parent common or organization, or whose tenant id has no children common or organization or subtenant. Are there any context segment hopping or linking/branching that forward tenant id into common or organization - ie /common, /organization and common/ or organization/. Crafting additional tests showing or understanding these contexts may be helpful.
Ref: https://learn.microsoft.com/en-us/entra/identity-platform/msal-client-application-configuration#authority
Ref: https://learn.microsoft.com/en-us/entra/msal/dotnet/acquiring-tokens/desktop-mobile/adfs-support#cases-where-identity-providers-are-federated-with-microsoft-entra-id

@star-starry-sea star-starry-sea marked this pull request as draft February 18, 2025 14:02
@star-starry-sea
Copy link
Author

Some review comments and ideas to consider. Drops third case described in line 61 for any-of-combination by dropping "or consumers". Requires design knowledge I would say. It would seem to me a common or organization may also have sub-tenants or that a tenant is not otherwise known to the vast ADFS->Entra federation and exists only as a registered tenant. Would this test check cause potential leak of valid tenant ids whos definition has no parent common or organization, or whose tenant id has no children common or organization or subtenant. Are there any context segment hopping or linking/branching that forward tenant id into common or organization - ie /common, /organization and common/ or organization/. Crafting additional tests showing or understanding these contexts may be helpful. Ref: https://learn.microsoft.com/en-us/entra/identity-platform/msal-client-application-configuration#authority Ref: https://learn.microsoft.com/en-us/entra/msal/dotnet/acquiring-tokens/desktop-mobile/adfs-support#cases-where-identity-providers-are-federated-with-microsoft-entra-id

Thanks much for your comment!

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

Successfully merging this pull request may close these issues.

2 participants