keycloak_list_users
Search users in a Keycloak realm by infix name/username/email, exact email/username, or custom attributes, with pagination and enabled/disabled filters.
Instructions
Search users in a realm. Use search for a loose match across name/username/email, username/email + exact for a precise lookup, or q to match custom attributes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Search custom user ATTRIBUTES: space-separated key:value pairs, e.g. "department:sales tier:gold". This is the only way to filter on attributes. | |
| max | No | Maximum number of results to return (1-500). Defaults to 50. | |
| No | Filter by email. Pair with `exact` for an exact match. | ||
| exact | No | Make `username`/`email`/`firstName`/`lastName` exact rather than prefix matches. | |
| first | No | Pagination offset — index of the first result to return (0-based). | |
| realm | No | Realm to operate on. Defaults to the server's configured realm (KEYCLOAK_REALM). | |
| search | No | Infix search across username, first name, last name and email. A prefix match by default; wrap in quotes ("bob") for an exact match. | |
| enabled | No | Only enabled (true) or only disabled (false) users. | |
| idpAlias | No | Only users federated from this identity provider. | |
| lastName | No | ||
| username | No | Filter by username. Pair with `exact` for an exact match. | |
| firstName | No | ||
| emailVerified | No | ||
| briefRepresentation | No | Return only the core fields of each item. Keep this true when listing — full representations are large and a big realm will flood the context. |