Adding members to groups via CSV

I recall that there was a way to mass-invite people to the site by copying and pasting a CSV.
I want to do the same thing for groups, but instead I have to manually enter one username at a time.

My use case is that I’m trying to separate our discourse members into patients & researchers. On our main site, we track which members are researchers, and they use SSO to log onto discourse. Thus it would be very straighttforward for us to do a nightly copy-and-paste of usernames that should be placed in the Researchers group.

Would it be possible to add this feature?

Yes, there is a howto here on sending batch invites… just follow that. If the email already exists on the site, they will just be granted whatever new group membership that invite specifies.

1 Like

The problem is that after switching to SSO, the “send invites” button is now gone. I was a huge fan of the bulk invite feature.

I think you would need to write API calls to set the groups on your SSO users.

oh - this script works on existing users too (assuming you have access to the container via docker)

1 Like

Thank you! Would you mind telling me how to import a csv file into lib/tasks in docker?
After launcher enter app, where should I go?