<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic gis.users.search - Exception: User does not exist or is inaccessible. in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-users-search-exception-user-does-not-exist-or/m-p/1553674#M10816</link>
    <description>&lt;P&gt;We want to get a list of all users on Enterprise.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;gis = GIS(url="url", username="user", password="pwd", expiration=9999)
users = gis.users.search('*',  max_users=1000)&lt;/LI-CODE&gt;&lt;P&gt;But we get this error:&amp;nbsp;&lt;BR /&gt;Exception: User does not exist or is inaccessible.&lt;BR /&gt;(Error Code: 400)&lt;/P&gt;&lt;P&gt;It works for max_users=10 but not with 100. The login user has Creator and Administrator privileges. Any suggestions how to get around this error?&lt;/P&gt;</description>
    <pubDate>Wed, 30 Oct 2024 08:58:22 GMT</pubDate>
    <dc:creator>ÅsaBlomberg</dc:creator>
    <dc:date>2024-10-30T08:58:22Z</dc:date>
    <item>
      <title>gis.users.search - Exception: User does not exist or is inaccessible.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-users-search-exception-user-does-not-exist-or/m-p/1553674#M10816</link>
      <description>&lt;P&gt;We want to get a list of all users on Enterprise.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;gis = GIS(url="url", username="user", password="pwd", expiration=9999)
users = gis.users.search('*',  max_users=1000)&lt;/LI-CODE&gt;&lt;P&gt;But we get this error:&amp;nbsp;&lt;BR /&gt;Exception: User does not exist or is inaccessible.&lt;BR /&gt;(Error Code: 400)&lt;/P&gt;&lt;P&gt;It works for max_users=10 but not with 100. The login user has Creator and Administrator privileges. Any suggestions how to get around this error?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2024 08:58:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-users-search-exception-user-does-not-exist-or/m-p/1553674#M10816</guid>
      <dc:creator>ÅsaBlomberg</dc:creator>
      <dc:date>2024-10-30T08:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: gis.users.search - Exception: User does not exist or is inaccessible.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-users-search-exception-user-does-not-exist-or/m-p/1553719#M10817</link>
      <description>&lt;P&gt;So sometimes you have a corrupt profile or more than 10 000 user accounts in that cases you need to step through the accounts one for one, you can use the code below to get to your user object. Just put it into a try catch if there is something broken&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;user_manager = arcgis.gis.UserManager(gis)
user_account='0123456789ABCDEF AND !_esri'
users_count = user_manager.advanced_search(query=user_account, return_count=True)
    for user_num in range(1, users_count + 1):
            user_dict = user_manager.advanced_search(query=user_account, start=user_num, max_users=1)
            print(f"Checking {user_dict['results'][0].username}")
            user = user_dict['results'][0]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;BR /&gt;Henry&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2024 12:58:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-users-search-exception-user-does-not-exist-or/m-p/1553719#M10817</guid>
      <dc:creator>HenryLindemann</dc:creator>
      <dc:date>2024-10-30T12:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: gis.users.search - Exception: User does not exist or is inaccessible.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-users-search-exception-user-does-not-exist-or/m-p/1555003#M10843</link>
      <description>&lt;P&gt;Thank you! It works perfectly&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2024 07:00:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-users-search-exception-user-does-not-exist-or/m-p/1555003#M10843</guid>
      <dc:creator>ÅsaBlomberg</dc:creator>
      <dc:date>2024-11-04T07:00:00Z</dc:date>
    </item>
  </channel>
</rss>

