<?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 Access user group membership through REST API using agoTools and Python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/access-user-group-membership-through-rest-api/m-p/131237#M10200</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to access the user['groups'] property using a python script that calls the getUsers from agoTools.&amp;nbsp; I can access the users and get information, but the 'groups' property (described as a json array) seems to be empty?&amp;nbsp; I may just be accessing it incorrectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am assigning the 'groups' property to a numpy array but the array comes up empty.&amp;nbsp; Any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for user in users:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; UserGroupList = numpy.array(user['groups'])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print UserGroupList.shape&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;produces a long list of:&lt;/P&gt;&lt;P&gt;(0,)&lt;/P&gt;&lt;P&gt;(0,)&lt;/P&gt;&lt;P&gt;(0,)&lt;/P&gt;&lt;P&gt;(0,)&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Sep 2014 23:26:25 GMT</pubDate>
    <dc:creator>HeathBrackett1</dc:creator>
    <dc:date>2014-09-05T23:26:25Z</dc:date>
    <item>
      <title>Access user group membership through REST API using agoTools and Python</title>
      <link>https://community.esri.com/t5/python-questions/access-user-group-membership-through-rest-api/m-p/131237#M10200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to access the user['groups'] property using a python script that calls the getUsers from agoTools.&amp;nbsp; I can access the users and get information, but the 'groups' property (described as a json array) seems to be empty?&amp;nbsp; I may just be accessing it incorrectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am assigning the 'groups' property to a numpy array but the array comes up empty.&amp;nbsp; Any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for user in users:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; UserGroupList = numpy.array(user['groups'])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print UserGroupList.shape&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;produces a long list of:&lt;/P&gt;&lt;P&gt;(0,)&lt;/P&gt;&lt;P&gt;(0,)&lt;/P&gt;&lt;P&gt;(0,)&lt;/P&gt;&lt;P&gt;(0,)&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 23:26:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/access-user-group-membership-through-rest-api/m-p/131237#M10200</guid>
      <dc:creator>HeathBrackett1</dc:creator>
      <dc:date>2014-09-05T23:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: Access user group membership through REST API using agoTools and Python</title>
      <link>https://community.esri.com/t5/python-questions/access-user-group-membership-through-rest-api/m-p/131238#M10201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Heath,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have never had much luck with agoTools and instead I use portalpy which seems to be a little more friendly.&amp;nbsp; You may want to consider trying portalpy rather than agoTools for what you are trying to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/esri/portalpy" title="https://github.com/esri/portalpy"&gt;Esri/portalpy · GitHub&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While although this is a different module, I think you may find this module a little bit easier to use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 21:50:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/access-user-group-membership-through-rest-api/m-p/131238#M10201</guid>
      <dc:creator>AlexanderNohe1</dc:creator>
      <dc:date>2014-09-15T21:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: Access user group membership through REST API using agoTools and Python</title>
      <link>https://community.esri.com/t5/python-questions/access-user-group-membership-through-rest-api/m-p/131239#M10202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alex,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ended up using the &lt;A href="https://github.com/Esri/ArcREST"&gt;Esri/ArcREST - GitHub&lt;/A&gt; module for some of the processes that I needed to do.&amp;nbsp; It worked.&amp;nbsp; I didn't know about the Esri/portalpy tools though.&amp;nbsp; Thanks for sharing that link.&amp;nbsp; I'll look into incorporating those into my scripting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Heath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 15:13:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/access-user-group-membership-through-rest-api/m-p/131239#M10202</guid>
      <dc:creator>HeathBrackett1</dc:creator>
      <dc:date>2014-09-16T15:13:16Z</dc:date>
    </item>
  </channel>
</rss>

