Skip to content

fix(catalog): resolve Microsoft tenant placeholder before registration - #231

Open
0717lee wants to merge 2 commits into
contextforge-org:mainfrom
0717lee:fix/catalog-oauth-tenant-placeholder
Open

0717lee wants to merge 2 commits into
contextforge-org:mainfrom
0717lee:fix/catalog-oauth-tenant-placeholder

Conversation

@0717lee

@0717lee 0717lee commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Fixes IBM/mcp-context-forge#7465

Microsoft-backed catalog entries publish the Entra ID issuer as a template (https://login.microsoftonline.com/{tenantid}/v2.0). Registering it verbatim stores an issuer the server cannot fetch, so discovery and client registration both fail.

The OAuth catalog form now shows a required Tenant ID field whenever the issuer contains the placeholder, and substitutes the value into the issuer before submit. The field disappears when the issuer no longer contains a placeholder. Authorization and token URLs are unchanged: the Entra common/organizations endpoints accept any tenant, and registration compares only their origin.

Stacked on #230 (both adjust this form's fields and validation); it will be rebased onto main once #230 merges.

Validation:

  • vitest CatalogOAuthForm + locale parity: 36 passed
  • npm run typecheck
  • eslint and prettier on the changed files

The catalog OAuth form required authorization and token URLs even
though registration discovers both from the issuer. Make empty values
valid while still rejecting malformed non-empty URLs. Add a regression
that submits empty endpoints for discovery.

Ref #7464

Signed-off-by: Li Fengmin <2080291162@qq.com>
Microsoft-backed catalog entries publish the Entra ID issuer as a
template with a {tenantid} placeholder. Registering it verbatim stores
an issuer that cannot be fetched, so discovery and client registration
fail.

Show a required Tenant ID field whenever the issuer contains the
placeholder, and substitute the value into the issuer before submit.
The field disappears when the issuer no longer contains a placeholder.

Ref #7465

Signed-off-by: Li Fengmin <2080291162@qq.com>
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

Successfully merging this pull request may close these issues.

[BUG]: Discovery and client registration fail for Microsoft servers

1 participant