Last Updated: Dec 17, 2024
Overview
Going by this documentation about the user search using the Lucene syntax, an admin should be able to use “blocked:false” and get the non-blocked users. But it returns nothing. This is very useful in viewing the non-blocked users to see which needs to be blocked. It works for “blocked:true”, where it returns the blocked users.
This article explains this behavior.
Applies To
- Lucene syntax
- View users
Cause
The issue here is that the “blocked” attribute may not be present on users, it is only within the Raw JSON when the attribute has been set at some point in the user’s history. In the absence of this attribute, Auth0 considers the user not blocked.
Solution
To work around this, search using the following Lucene query to get all users that are not blocked:
NOT blocked:true
This way only blocked users are filtered out, but it is not reliant on finding an exact match for “blocked:false” present within the user’s JSON.