Unable to Find Users When Querying by Fields Such as last_password_reset and blocked_for

Overview

When querying users by fields such as last_password_reset and blocked_for, no results are returned. This occurs in both the dashboard and the List or Search Users endpoint.

Applies To

  • User search
  • Searchable fields
  • last_password_reset
  • blocked_for

Solution

As explained in the User Search Query Syntax documentation, only fields in the normalized user profile and the following fields are searchable:

Search Field Data Type Description
phone_number text The user’s phone number. Only valid for users with SMS connections.
phone_verified boolean The true/false value indicates whether the user’s phone number has been verified. Only valid for users with SMS connections.
logins_count integer The number of times the user has logged in. If a user is blocked and logs in, the blocked session is counted in logins_count and updates the last_login value.
created_at date time The timestamp of when the user profile was first created.
updated_at date time The timestamp of when the user’s profile was last updated/modified.
last_login date time The timestamp of when the user last logged in. In case this property executes from inside a Rule with the user object, the value will be associated with the login that triggered the rule (since rules execute after the actual login).
last_ip text (valid IP address) The IP address associated with the user’s last login.
blocked boolean The true or false value indicates if the user has been blocked. Note: true only brings back users blocked via the Admin Dashboard and Management API; it does not bring back users blocked by brute force anomaly detection.
email.domain text The domain part of the user’s email.
organization_id text (valid organization ID) The organization that the user is a member of

Fields such as last_password_reset and blocked_for are not searchable.