<?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 Re: Get new user types with python api for ArcGIS? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/get-new-user-types-with-python-api-for-arcgis/m-p/1345541#M9235</link>
    <description>&lt;P&gt;The best option seems to set the role AND the usertype AND the level when you create a new user. Otherwise the new member default get in your way and the user may either not be created or created with the wrong settings. This is not really clear in de documentation.&lt;/P&gt;</description>
    <pubDate>Fri, 03 Nov 2023 14:47:48 GMT</pubDate>
    <dc:creator>jorisfrenkel</dc:creator>
    <dc:date>2023-11-03T14:47:48Z</dc:date>
    <item>
      <title>Get new user types with python api for ArcGIS?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/get-new-user-types-with-python-api-for-arcgis/m-p/860239#M4157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am doing reporting on our user types on ArcGIS Online. Recently AGOL changed user types from level 1 &amp;amp; level 2 to Creator, Editor, Viewer, etc as per screenshot below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="new user types on AGOL" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/452339_Clipboard01.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't find the right object (or property of an object) in&amp;nbsp;&lt;SPAN&gt;ArcGIS API for Python to get these&lt;/SPAN&gt;&amp;nbsp;user types&amp;nbsp;programically&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;All I get is our custom roles, levels (which are 1, 2 and 11 and nothing else) and user types (org_admin, org_publisher and org_users) which don't match the new user types. Has anyone worked out how to do it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My current code is something like that:&lt;/P&gt;&lt;P&gt;for user in gis.users.search(max_users=500):&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;try:&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;name = user.username&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;role = user.role&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ulevel = user.level&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;firstname = user.firstName&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;lastname = user.lastName&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;last_login = user.lastLogin&lt;BR /&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if hasattr(user, 'roleId'):&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for role in roles:&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(user.roleId == role.role_id):&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;role_name = role.name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else:&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;role_name = "undefined"&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;diff_name = gis.users.get(name)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jul 2019 07:05:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/get-new-user-types-with-python-api-for-arcgis/m-p/860239#M4157</guid>
      <dc:creator>lxd</dc:creator>
      <dc:date>2019-07-04T07:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: Get new user types with python api for ArcGIS?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/get-new-user-types-with-python-api-for-arcgis/m-p/860240#M4158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lidia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The property you're looking for is&amp;nbsp;&lt;SPAN style="color: #16325c; background-color: #ffffff; font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;userType. &lt;/SPAN&gt;Valid values correspond to the userLicenseTypeId values described in REST API documentation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;creatorUT | editorUT | GISProfessionalAdvUT | GISProfessionalBasicUT | GISProfessionalStdUT | viewerUT | fieldWorkerUT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;A href="https://developers.arcgis.com/rest/enterprise-administration/portal/create-user.htm" style="color: #006cb5; font-weight: inherit; text-decoration: none;" target="_blank"&gt;https://developers.arcgis.com/&lt;SPAN class=""&gt;&lt;/SPAN&gt;rest/enterprise-administration&lt;SPAN class=""&gt;&lt;/SPAN&gt;/portal/create-user.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jul 2019 23:56:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/get-new-user-types-with-python-api-for-arcgis/m-p/860240#M4158</guid>
      <dc:creator>EarlMedina</dc:creator>
      <dc:date>2019-07-05T23:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Get new user types with python api for ArcGIS?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/get-new-user-types-with-python-api-for-arcgis/m-p/860241#M4159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great! It's exactly what I was after! Thanks.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2019 01:31:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/get-new-user-types-with-python-api-for-arcgis/m-p/860241#M4159</guid>
      <dc:creator>lxd</dc:creator>
      <dc:date>2019-07-22T01:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: Get new user types with python api for ArcGIS?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/get-new-user-types-with-python-api-for-arcgis/m-p/1239870#M8145</link>
      <description>&lt;P&gt;When I run the code using user.userType, the only value returned from ArcGIS Enterprise v10.9.1 is 'arcgisonly'.&amp;nbsp; Using 'user.userLicenseTypeId' got me what I expected:&amp;nbsp; the four types associated with our User Types in our Enterprise portal: Creator, Editor, Mobile Worker, and Viewer.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would be great if&amp;nbsp;&lt;SPAN&gt;userType and userLicenseTypeId were documented in the python API docs:&amp;nbsp;&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#user" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#user&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 01:16:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/get-new-user-types-with-python-api-for-arcgis/m-p/1239870#M8145</guid>
      <dc:creator>ChrisBeaudette</dc:creator>
      <dc:date>2022-12-10T01:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Get new user types with python api for ArcGIS?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/get-new-user-types-with-python-api-for-arcgis/m-p/1345541#M9235</link>
      <description>&lt;P&gt;The best option seems to set the role AND the usertype AND the level when you create a new user. Otherwise the new member default get in your way and the user may either not be created or created with the wrong settings. This is not really clear in de documentation.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 14:47:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/get-new-user-types-with-python-api-for-arcgis/m-p/1345541#M9235</guid>
      <dc:creator>jorisfrenkel</dc:creator>
      <dc:date>2023-11-03T14:47:48Z</dc:date>
    </item>
  </channel>
</rss>

