I want to return a list of all users in my ArcGIS Online (AGOL) organization. However, the result returned in gis.users.search() appears limited to 100 users.

Is there any way to return all users or to perform multiple searches until all users are found?

4 Answers 4


Try using the UserManager with the Python API. The UserManager has an option for max_records which can be set to the number of users in your group

from arcgis.gis import GIS
import arcgis 

gis = GIS("https://www.arcgis.com", "USERNAME", "PASSWORD") # set first arguement to your Portal or AGOL
users = arcgis.gis.UserManager(gis)

# get the total number of users in your AGOL account provided you have administrative priveledges
totalUsers = users.counts('user_type', as_df=False)[0]['count']

# use the total number of users in your AGOL Account as an arguement for max_users
allUsers = users.search(query=None, max_users=totalUsers)
  • ArcGIS Enterprise 10.6.1 returns "NotImplementedError: counts is not implemented at version 6.1 of Enterprise" - is there a workaround?
    – wunderkind
    Aug 26, 2020 at 2:28
  • 1
    @wunderkind I updated my answer so that it even simpler than before. But in regards to Enterprise. I don't have access to Enterprise but the docs developers.arcgis.com/python/api-reference/… Still list "counts" for Enterprise or AGOL
    – F_Kellner
    Aug 26, 2020 at 17:17
  • @F_Kellner - please email me: [email protected] - I have something to help.
    – KHibma
    Sep 2, 2020 at 18:55

Go download the free Admin tools from GeoJobe available in the ArcGIS online store. Believe it creates an Excel output


I have similar issue but was able to fix it using a loop

def get_users_info(gis,esriplatform):
    start = 0
    users_info = []

    while True:
        source_users = gis.users.advanced_search(query='!esri_ & !portaladmin', start=start, max_users=200)
        list_users = source_users.get('results')

        if not list_users:

        start += 100

    return users_info

While it's true that each individual query returns a max of 100 records, you can use pagination to send multiple requests for up to 10000 results.

https://developers.arcgis.com/rest/users-groups-and-items/search.htm - see the start and num parameters.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.