Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add createdTimestamp filter (before/after) to /admin/realms/{realm}/users #43829

@Disc-Addict

Description

@Disc-Addict

Description

It would be extremely valuable if the Admin REST API for
GET /admin/realms/{realm}/users

supported filtering users by their creation date — for example via:

?createdAfter=2025-10-01T00:00:00Z
?createdBefore=2025-10-15T00:00:00Z

Value Proposition

Why this matters

Currently, the only way to find users created within a certain time range (e.g. “users registered in the last 14 days”) is to fetch all users and filter client-side by createdTimestamp.
This quickly becomes inefficient for realms with thousands or millions of users, since every request requires a full scan with pagination.

Example use cases

  • Analytics dashboards showing weekly or monthly new registrations
  • Syncing newly registered users into CRM / mailing systems
  • Admin reports or auditing tools that need to identify recent sign-ups
  • Automated cleanup or verification workflows for recent accounts

Goals

Suggested behavior

  • Support ISO 8601 date/time or epoch timestamps.
  • Combine logically with other query parameters (search, q, pagination).
  • Return all users whose createdTimestamp lies after or before the given value(s).

Non-Goals

This request does not aim to introduce new user metadata fields, modify existing timestamps, or change how users are created or stored.
It only proposes to add optional filtering capabilities (createdBefore, createdAfter) to the existing /users endpoint, without affecting current API behavior or backward compatibility.

Discussion

No response

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions