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

    How Do I Gather A List of All My Users For a Specific Applicatoin?

    Scheduled Pinned Locked Moved Unsolved
    Q&A
    1
    2
    1.2k
    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.
    • joshuaJ
      joshua
      last edited by joshua

      How Do I Gather A List of All My Users?

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

        One recommendation is to use the User Search API to gather all users for a specific Application

        For example,

        curl --request POST \
          --url https://local.fusionauth.io/api/user/search \
          --header 'Authorization: <YOUR_API_KEY>' \
          --header 'Content-Type: application/json' \
          --data '{
          "search": {
            "numberOfResults": 50,
            "query": 
        
        		
        "{\"bool\":{\"must\":[{\"nested\":{\"path\":\"registrations\",\"query\":{\"bool\":{\"must\":[{\"match\":{\"registrations.applicationId\":\"<YOUR_APPLICATION_UUID>\"}}]}}}}]}}",
        
            "startRow": 0
          }
        }'
        

        Returns all the users that belong to a applciation Id using the query parameter. More information can be found in our documentation below.

        https://fusionauth.io/docs/v1/tech/apis/users/#elasticsearch-search-engine

        Accessing the Admin UI > Users > Search Box > Advanced > Show ElasticSearch Query Can also reveal prebuilt queries that you can run against users via API (move the toggles to observe how the query will change over time).

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