AnsweredAssumed Answered

Unable to add list of users to groups

Question asked by khaddockesriuk-esridist Employee on Dec 7, 2017
Latest reply on Aug 10, 2018 by MKellyesri-ireland-ie-esridist

Hi, I am trying to add a list of users to a group using the Python API but can not get it to work correctly. I have tested printing out the list and that works but it wont add them to a group.

 

This is what I have tried:

for user in UserList: 
     TheGroup.add_users(user)

 

I have also tried:

 for user in UserList: 
     TheGroup.add_users(user.username)

 

Also:

for user in UserList: 
     TheGroup.add_users(user['username'])

 

And finally:

 for user in UserList: 
     TheGroup.add_user([user])

 

Would be very grateful if anyone know of a solution or what I am doing wrong.

 

Thank you!

Outcomes