I'm trying to access the user['groups'] property using a python script that calls the getUsers from agoTools. I can access the users and get information, but the 'groups' property (described as a json array) seems to be empty? I may just be accessing it incorrectly.
I am assigning the 'groups' property to a numpy array but the array comes up empty. Any suggestions?
for user in users:
UserGroupList = numpy.array(user['groups'])
print UserGroupList.shape
produces a long list of:
(0,)
(0,)
(0,)
(0,)
...
Hi Heath,
I have never had much luck with agoTools and instead I use portalpy which seems to be a little more friendly. You may want to consider trying portalpy rather than agoTools for what you are trying to do.
While although this is a different module, I think you may find this module a little bit easier to use.
I hope this helps!
Thanks
Hi Alex,
I ended up using the Esri/ArcREST - GitHub module for some of the processes that I needed to do. It worked. I didn't know about the Esri/portalpy tools though. Thanks for sharing that link. I'll look into incorporating those into my scripting.
Heath