fix: add knownAuthorities check to issuer validation for CIAM GUID-based issuer URL#8595
Merged
Merged
Conversation
…sed issuers Entra External ID (CIAM) may return an OIDC issuer with the tenant GUID as the host (e.g. https://<guid>.ciamlogin.com/<guid>/v2.0) even when the authority was configured with a tenant name. The existing issuer validation rules only match against the authority host or hardcoded Microsoft hosts, causing endpoints_resolution_error for CIAM tenants. Changes: - Add Rule 5 to validateIssuer: accept issuers whose HTTPS host is explicitly listed in the developer-configured knownAuthorities - Refactor isInKnownAuthorities to accept a host parameter so it can be reused for both cloud discovery and issuer validation - Add unit tests for Rule 5 (accept, reject, reject-HTTP) - Update CIAM docs in authority.md with workaround guidance - Update knownAuthorities description in configuration.md Fixes #8592 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR fixes CIAM issuer validation failures when Entra External ID returns a GUID-based issuer host by allowing HTTPS issuer hosts explicitly listed in knownAuthorities.
Changes:
- Add issuer validation Rule 5 to accept HTTPS issuer hosts in
knownAuthorities. - Refactor
isInKnownAuthoritiesto accept a host parameter and reuse it in multiple validation paths. - Update docs and add unit tests around the new Rule 5 behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/msal-common/src/authority/Authority.ts | Adds Rule 5 issuer validation and refactors isInKnownAuthorities(host) for reuse. |
| lib/msal-common/test/authority/Authority.spec.ts | Adds unit tests for Rule 5 knownAuthorities-based issuer validation. |
| lib/msal-common/docs/authority.md | Documents CIAM GUID-based issuer behavior and knownAuthorities workaround. |
| lib/msal-browser/docs/configuration.md | Updates knownAuthorities description to include CIAM guidance. |
| change/@azure-msal-common-24675ece-0d4f-478d-a1ec-415b970a0bb8.json | Adds changelog entry for the patch release. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ration.md type, add HTTP rejection test Agent-Logs-Url: https://github.com/AzureAD/microsoft-authentication-library-for-js/sessions/1930f599-2e2e-444b-af52-bc01c2bc5049 Co-authored-by: lalimasharda <26092202+lalimasharda@users.noreply.github.com>
lalimasharda
commented
May 19, 2026
Co-authored-by: Lalima Sharda <lalima.sharda@gmail.com>
lalimasharda
commented
May 19, 2026
Contributor
Author
|
@copilot fix formatting error in build |
Agent-Logs-Url: https://github.com/AzureAD/microsoft-authentication-library-for-js/sessions/32710a88-e083-4502-b9b4-ba42a6dccf54 Co-authored-by: lalimasharda <26092202+lalimasharda@users.noreply.github.com>
Agent-Logs-Url: https://github.com/AzureAD/microsoft-authentication-library-for-js/sessions/551b2be1-b8be-45c1-84c5-d432d0c9fc57 Co-authored-by: lalimasharda <26092202+lalimasharda@users.noreply.github.com>
Contributor
Fixed in commit |
hectormmg
approved these changes
May 21, 2026
peterzenz
approved these changes
May 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Entra External ID (CIAM) may return an OIDC issuer with the tenant GUID as the host (e.g. https://.ciamlogin.com//v2.0) even when the authority was configured with a tenant name. The existing issuer validation rules only match against the authority host or hardcoded Microsoft hosts, causing endpoints_resolution_error for CIAM tenants.
Changes:
Fixes #8592