Hey all,
I am trying to use a very simple python script to add users to a group and am getting stuck. It works successfully with one group but when I add more I get errors. Here is my code:
from arcgis import *
gis = GIS("url", "username", "password")
list1 = ['AdvancedUser', 'DefaultUser']
grouping = gis.groups.search('title: group1')
grouping[0].add_users(list1)
When I try with multiple groups here:
from arcgis import *
gis = GIS("url", "username", "password")
list1 = ['AdvancedUser', 'DefaultUser']
grouping = gis.groups.search('title: group1', 'title: group2')
grouping.add_users(list1)
I get the error:
Traceback (most recent call last):
File "<string>", line 5, in <module>
AttributeError: 'list' object has no attribute 'add_users'
Thank you for any help you can provide.