Expose SSO identities via Admin API

(#4194) Feature Closed: Shipped api

Current problem

Via the Admin Users API, the SSO state of a user is visible via the traits array. Sadly, the trait sso:<identity> references the postgres user_sso_identities ID, not the ID from OIDC sub. the sso_identitiy mapping to the SSO ID attribute does not seem to be exposed via (Admin) API yet, which makes figuring out which SSO user a fluxer user corresponds to not possible. This is needed for example for cleanup scripts, so that deleted SSO users can be deleted in Fluxer as well.

Proposed change

Either:
  • expose the SSO ID attribute (sub) in the traits as well
  • provide an API endpoint to be able to query sso_identity IDs in order to get to the SSO attributes

Platform

API

2 comments

Sign in with Fluxer to comment and vote.
Comment by Rex
RexSystem 1 vote
Status changed from Under consideration to Shipped
Shipped in Fluxer 2026.1025.4648 for self-hosted instances. The admin API now has GET /admin/users/{user_id}/sso-identities to list a user's provider subjects, and GET /admin/sso-identities to find the user bound to a given provider subject. Run rexctl upgrade to get it.
Comment by Kai
Kai OP1 vote
This works, but causes extra calls for every user, making for example a simple 5-call pagination to /api/users to get 1000 users into a 1005 call method to get all users and their sso-identities. It would be more efficient (on the client scripting side) to either:
  • provide a list of Admin SSO Identity objects on a Admin User object
  • have a list soo-identities API, making the call above into a 10-call pagination.
The Admin SSO Identity objects could only be returned when requested via a query parameter, but those are currently only for filtering, not controlling the output, so I get that it might not be the best idea...