How to get all locked users
-
Hello,
Is there a way to retrieve all locked users from FusionAuth using the JavaScript client or through a direct REST call? From what I can tell, it seems that you can only access this information for specific users, not for all users at once. -
@francesgee836 I came across this open issue that may be of use.
If you are using the Elasticsearch search engine:
You can search for users with active:false to find users who are not active, which typically includes locked users.If you are using the database search engine:
You cannot directly filter for locked users in the search API. The workaround is to retrieve all users (using a wildcard search) and then filter for active:false in your application code after retrieving the results.Currently, FusionAuth does not provide a built-in filter specifically for "locked" users distinct from "inactive" users in the API or UI. The active:false filter is the closest available option, and it may include both locked and other inactive users.
-
Thanks for your answer. I got it.