Select to view content in your preferred language

Bulk Invite/add Users to group from list or file

2417
10
01-27-2023 01:05 PM
Status: Open
PatIampietro
Frequent Contributor

Being able to assign group membership upon account creation is great, but it would be helpful if Group owners/Admins could bulk invite/add users to a group from a list or file of member names or SAML IDs rather than needing to type each one in or search for each member individually.

At the start of every semester I assist faculty by setting up groups for their course sections and adding their students to the respective groups. I accomplish this by using the "Add members using their organization-specific IDs without sending invitations" method (we use SSO Enterprise logins), which allows me to upload a class roster provided by the instructor. During the invite configuration I assign the group I've created for the course. This works fine for those that are not already org members (have never signed in), but fails for existing ones. I then have to add each of the latter to the group manually, one member at a time.

If the Invite GUI for groups included a way to past a list or upload a file of SAML IDs, member names, or email addresses, it would be much easier to add multiple members to a group at a time.

Tags (4)
10 Comments
KateCarlson

This is a great idea, and your workaround solution to group creation during the invitation process is very clever.  

Our solution has been to have students login to create their accounts early in the semester, professors will share this resource and require action during a class or make it worth a point or 2 to get their accounts created in a few quick easy steps. After that, we can create the groups. A bulk upload of the group list(s) as you have described would be an incredible time saver.

PatIampietro

@ Kate- thanks for sharing the AGOL sign-in guide! Ours is here: Signing in to ArcGIS Online (AGOL).

 

Glad to hear somebody else would find bulk group user management useful!

DavidMedeiros

Adding my comment here rather than start a new thread. YES! Groups need a bulk add option and I'm surprised (although I shouldn't be at this point) that this is not already an admin feature for managing AGO Groups. This is an obvious use case, which I suppose is exactly why it got left off the tools feature list!

Currently have a sub admin who needs to add his user base of 1000 members to a specific AGO Group. Currently he has no option but to add thena ll 1 at a time.

CatP
by

I do this by concatenating the student numbers (user IDs) like so: '123456 OR 234567 OR 456789' etc. and entering the string in the member search box. This will reveal all account with those IDs. Selecting all members you can then choose 'More' and 'Manage Group Membership' to do it in bulk. 

PatIampietro

Good trick @CatP ! But you still have to hand-type or copy/paste the IDs into the search box, which is work. The BEST solution would be for the onboarding/account creation process to recognize the existing users and update all requested entitlements, group membership, etc. instead of just failing on those members. Then we could use that process to bulk add users to groups.

Next best would be bulk add in the group Invite Members GUI.

 

Either would be a big improvement.

CatP
by

Agreed, @Patlampietro, but failing an ESRI solution like you detail it's just one copy-paste from Excel after you concatenate into a string. 

PatIampietro

@CatP yeah I generally copy the list of members that failed to add (b/c they were already org members), paste into a text doc where I replace the punctuation w/ ORs, and then copy/paste into the search box. Clunky but it works.

ChelseaRozek

@CatP thanks for the idea! Here's some python to generate a list of users in a particular group for when I want to bulk apply something to them and can't search on that group: 

from arcgis.gis import GIS
username="USERNAMEHERE"
password="PASSWORDHERE"
agol = GIS("https://ORGNAMEHERE.maps.arcgis.com",username,password)
thegroup = agol.groups.search('title:NAMEOFGROUP')[0].get_members()
userlist = thegroup['users']
answer = ''
for x in userlist:
    answer = answer + x + " OR "
answer[:-4]

 

jorisfrenkel

This is possible with a AGOL notebook.

You first have to create a CSV-file with a list of the user names, add it to AGOL and publish it.

Then you run this code (first fill in the correct item names) in a notebook:

# Basic settings
from arcgis.gis import GIS
gis = GIS("home")

#Find the group

grpName = "<name>"
grps = gis.groups.search('title:' + grpName)

for grp in grps:
  if (grpName == grp.title):
  destgroep = grp

 

# Get the published table

tabelNaam = "<naam>"
mijn_items = gis.content.search('title:' + tabelNaam)

inputTb = None
for tb in mijn_items:
  if (tabelNaam == tb.title):
    inputTb = tb

 

#Loop through the table and add each user to the group

tbl = inputTb.tables[0]

tabSet = tbl.query(where='OBJECTID>0')
for row in tabSet.features:
  gebnaam = row.attributes['<name of field with user name>']

  notAdded = destgroep.add_users([gebnaam])

PatIampietro

Thanks @jorisfrenkel & @ChelseaRozek ! Good stuff!