<?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 Creator Users per group in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/get-creator-users-per-group/m-p/811668#M2475</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey &lt;A href="https://community.esri.com/migrated-users/6905"&gt;Jeff Timm&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I just checked the API and the group.get_memebers() returns an array of usernames and not user objects like I thought it would. I think if you change it to something like this you will have some better luck:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;group = gis.groups.get("6bde3136acbb48bcba1edc2eca61eac6")&lt;BR /&gt;response = group.get_members()&lt;BR /&gt;for username in response['users'] :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;user = gis.users.get(username)&lt;BR /&gt; &amp;nbsp;&amp;nbsp; if(user.userLicenseTypeId == "creatorUT"):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(user)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 19 Apr 2020 23:44:38 GMT</pubDate>
    <dc:creator>BenTurrell</dc:creator>
    <dc:date>2020-04-19T23:44:38Z</dc:date>
    <item>
      <title>Get Creator Users per group</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/get-creator-users-per-group/m-p/811665#M2472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am struggling with getting all of the creators in a certain group in my Enterprise portal environment.&lt;/P&gt;&lt;P&gt;I am using Enterprise Notebook.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;group = gis.groups.get("6bde3136acbb48bcba1edc2eca61eac6")&lt;BR /&gt;response = group.get_members()&lt;BR /&gt;for user in response['users'] :&lt;BR /&gt; print(user)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;will list all the users in specified group, but how do I limit it further to only Creators?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2020 21:13:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/get-creator-users-per-group/m-p/811665#M2472</guid>
      <dc:creator>JeffTimm</dc:creator>
      <dc:date>2020-04-16T21:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: Get Creator Users per group</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/get-creator-users-per-group/m-p/811666#M2473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey &lt;A href="https://community.esri.com/migrated-users/6905"&gt;Jeff Timm&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can print out the creators using something like so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;group = gis.groups.get("6bde3136acbb48bcba1edc2eca61eac6")&lt;BR /&gt;response = group.get_members()&lt;BR /&gt;for user in response['users'] :&lt;BR /&gt; &amp;nbsp;&amp;nbsp; if(user.userLicenseTypeId == "creatorUT"):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(user)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Let me know if you have any issues with the above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;If this answer was helpful please mark it as helpful. If this answer solved your question please mark it as the answer to help others who have the same question.&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2020 23:14:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/get-creator-users-per-group/m-p/811666#M2473</guid>
      <dc:creator>BenTurrell</dc:creator>
      <dc:date>2020-04-16T23:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: Get Creator Users per group</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/get-creator-users-per-group/m-p/811667#M2474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I still get an error.&amp;nbsp; I tried something similar to what you proposed.&amp;nbsp; It is the user type that I have issues with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE style="color: #000000; background-color: #ffffff; border: 0px; font-size: 14px; padding: 1px 0px;"&gt;&lt;SPAN class="" style="color: #e75c58;"&gt;---------------------------------------------------------------------------&lt;/SPAN&gt;&lt;SPAN class="" style="color: #e75c58;"&gt;AttributeError&lt;/SPAN&gt;                            Traceback (most recent call last)&lt;SPAN class="" style="color: #00a250;"&gt;&amp;lt;ipython-input-2-8fcaf853ac6d&amp;gt;&lt;/SPAN&gt; in &lt;SPAN class="" style="color: #60c6c8;"&gt;&amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;      2&lt;/SPAN&gt; response &lt;SPAN class="" style="color: #208ffb;"&gt;=&lt;/SPAN&gt; group&lt;SPAN class="" style="color: #208ffb;"&gt;.&lt;/SPAN&gt;get_members&lt;SPAN class="" style="color: #208ffb;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #208ffb;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;      3&lt;/SPAN&gt; &lt;SPAN class="" style="color: #00a250;"&gt;for&lt;/SPAN&gt; user &lt;SPAN class="" style="color: #00a250;"&gt;in&lt;/SPAN&gt; response&lt;SPAN class="" style="color: #208ffb;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="" style="color: #208ffb;"&gt;'users'&lt;/SPAN&gt;&lt;SPAN class="" style="color: #208ffb;"&gt;]&lt;/SPAN&gt; &lt;SPAN class="" style="color: #208ffb;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;----&amp;gt; 4&lt;/SPAN&gt;&lt;SPAN class="" style="color: #e75c58;"&gt;    &lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;if&lt;/SPAN&gt;&lt;SPAN class="" style="color: #208ffb;"&gt;(&lt;/SPAN&gt;user&lt;SPAN class="" style="color: #208ffb;"&gt;.&lt;/SPAN&gt;userLicenseTypeId &lt;SPAN class="" style="color: #208ffb;"&gt;==&lt;/SPAN&gt; &lt;SPAN class="" style="color: #208ffb;"&gt;"creatorUT"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #208ffb;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #208ffb;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;      5&lt;/SPAN&gt;       print&lt;SPAN class="" style="color: #208ffb;"&gt;(&lt;/SPAN&gt;user&lt;SPAN class="" style="color: #208ffb;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #e75c58;"&gt;AttributeError&lt;/SPAN&gt;: 'str' object has no attribute 'userLicenseTypeId'&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2020 14:06:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/get-creator-users-per-group/m-p/811667#M2474</guid>
      <dc:creator>JeffTimm</dc:creator>
      <dc:date>2020-04-17T14:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Get Creator Users per group</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/get-creator-users-per-group/m-p/811668#M2475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey &lt;A href="https://community.esri.com/migrated-users/6905"&gt;Jeff Timm&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I just checked the API and the group.get_memebers() returns an array of usernames and not user objects like I thought it would. I think if you change it to something like this you will have some better luck:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;group = gis.groups.get("6bde3136acbb48bcba1edc2eca61eac6")&lt;BR /&gt;response = group.get_members()&lt;BR /&gt;for username in response['users'] :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;user = gis.users.get(username)&lt;BR /&gt; &amp;nbsp;&amp;nbsp; if(user.userLicenseTypeId == "creatorUT"):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(user)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Apr 2020 23:44:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/get-creator-users-per-group/m-p/811668#M2475</guid>
      <dc:creator>BenTurrell</dc:creator>
      <dc:date>2020-04-19T23:44:38Z</dc:date>
    </item>
  </channel>
</rss>

