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

    FusionAuth Get all users not returning all users

    Scheduled Pinned Locked Moved
    General Discussion
    2
    3
    341
    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.
    • M
      mohyddin.tash
      last edited by

      I am using the query below to get all users. In the fusion auth admin dashboard there are 29 users for that application_id however only 25 users come back. Note: in the response also it says "total: 29" but only 25 users are in the response.

      {
        "bool" : {
          "must" : [ {
            "nested" : {
              "path" : "registrations",
              "query" : {
                "bool" : {
                  "must" : [ {
                    "match" : {
                      "registrations.applicationId" : "<my-app-id>"
                    }
                  } ]
                }
              }
            }
          } ]
        }
      }
      

      I can't really tell what is going on. Only thing I notice is that in the admin dashboard the paging shows 25 users per page, but I don't think this has to do with the problem?

      joshuaJ 1 Reply Last reply Reply Quote 0
      • joshuaJ
        joshua @mohyddin.tash
        last edited by

        @mohyddin-tash

        We are updating our documenation to highlight a key difference here.

        You will want to make sure that you have adjusted numberOfResults value, which in this case is likely defaulting to 25.

        It is best to keep a small "results window" but then loop through the results with an increasing startRow value.

        • https://fusionauth.io/docs/v1/tech/core-concepts/search#pagination

        I hope this helps

        Thanks,
        Josh

        M 1 Reply Last reply Reply Quote 0
        • M
          mohyddin.tash @joshua
          last edited by

          @joshua Thank you for updating the docs. I can confirm simply increasing the numberOfResults indeed returns the rest of the users!

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