8000 Fix identity provider links for users linked past the first 100 providers by marsluca · Pull Request #54435 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Fix identity provider links for users linked past the first 100 providers - #54435

Closed
marsluca wants to merge 1 commit into
keycloak:mainfrom
marsluca:idp-links-pagination
Closed

marsluca wants to merge 1 commit into
keycloak:mainfrom
marsluca:idp-links-pagination

Conversation

@marsluca
Copy link
Copy Markdown
Contributor

Closes #52482

The Identity provider links tab looked up the user's linked providers in GET /identity-provider/instances, which returns at most 100 providers when no max is given. If a user was linked to a provider outside that first page, providerId stayed undefined and building the provider link threw Missing ":providerId" param, so the tab only showed that error.

The tab now fetches each linked provider by alias, the same way UserSelect and GroupSelect resolve their items. A user usually has only a few links, so this is a few small requests. If a provider can't be found, the alias is shown without a link instead of breaking the tab.

I kept the fix in the admin console. The server-side endpoint suggested in the issue would remove this lookup as well, but it needs a new admin API.

Testing:

  • New test in test/users/main.spec.ts: a realm with 101 providers and a user linked to the last one. It fails on main with the error above and passes with this change.
  • The users and identity providers specs pass on Chromium.
  • I also checked a user linked to a social and an OIDC provider: the links open the right provider pages, only the unlinked provider shows "Link account", and unlinking still refreshes the table.

AI-assisted (Claude Code).

…ders

The tab looked up the user's linked providers in the first page of
identity providers, which the server caps at 100. When the provider was
not on that page, providerId stayed undefined and building the link
threw 'Missing ":providerId" param'. Fetch each linked provider by alias
instead, and show the alias without a link if the provider can't be
found.

Closes keycloak#52482

Signed-off-by: Luca Marsella <34103646+marsluca@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 29, 2026 09:08
@marsluca
marsluca requested review from a team as code owners October 29, 2026 09:08
Copilot AI left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@edewit edewit left a comment •
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure this fixes it, but it's very ineffective

@edewit
edewit commented Oct 29, 2026
Copy link
Copy Markdown
Contributor

@pedroigor do you want to do it like this or do we want to have an endpoint for this?

@sguilhen
Copy link
Copy Markdown
Contributor

I agree with @edewit 's first comment - fixes the issue but it is not the most efficient way. Like I said in the linked issue, I do think our backend lacks proper support for retrieving the linked identities. The same functionality exists in the account console, so I think the proper support should be added to the backend.

@pedroigor pedroigor left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @sguilhen and @edewit. We should avoid filtering on the client and consider adding a separate endpoint.

@sguilhen
sguilhen commented Nov 4, 2026
Copy link
Copy Markdown
Contributor
< 8000 tbody class="d-block">

Closing in favor of #54617

@sguilhen sguilhen closed this Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing :providerId param in Identity Provider Links page when linked IdP is not included in first paginated /identity-provider/instances response

5 participants

0