FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    How to get all locked users

    Scheduled Pinned Locked Moved
    General Discussion
    2
    3
    11
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      francesgee836
      last edited by

      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.

      mark.robustelliM 1 Reply Last reply Reply Quote 0
      • mark.robustelliM
        mark.robustelli @francesgee836
        last edited by

        @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.

        F 1 Reply Last reply Reply Quote 0
        • F
          francesgee836 @mark.robustelli
          last edited by

          Thanks for your answer. I got it.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post