laptop and a wrench

Bug

The gis.users.advanced_search() script returns an incorrect user count.

Last Published: January 27, 2022 ArcGIS API for Python
Bug ID Number BUG-000145417
SubmittedDecember 20, 2021
Last ModifiedJune 18, 2025
Applies toArcGIS API for Python
Version found1.9.1
Operating SystemWindows OS
Operating System Version10.0 64 Bit
StatusKnown Limit

Additional Information

When using advanced_search the orgid is not specified as it is in regular search. The orgid needs to be specified in the query to limit the search to only the organization. For example, say an ArcGIS Online organization has multiple users with the email: 'test@email.com'. To return the count of users within the org with this email, the following code could be used: gis.users.advanced_search(query='email: AND orgid:', return_count = True) Note, the orgid can be found in the gis properties: gis.properties.id

Workaround

Use the gis.users.search script as documented here: https://developers.arcgis.com/python/guide/accessing-and-managing-users/#searching-for-user-accounts

Steps to Reproduce

Bug ID: BUG-000145417

Software:

  • ArcGIS API for Python

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options