# Adding members to groups via CSV

**URL:** https://meta.discourse.org/t/adding-members-to-groups-via-csv/34298
**Category:** Support
**Tags:** groups, invites
**Created:** [October 9, 2015, 3:41am UTC](https://meta.discourse.org/t/adding-members-to-groups-via-csv/34298 "2015-10-09T03:41:34Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Joey\_Tuan](https://avatars.discourse-cdn.com/v4/letter/j/db5fbb/32.png) [@Joey\_Tuan](https://meta.discourse.org/u/Joey_Tuan)
#### Post date: [October 9, 2015, 3:41am UTC](https://meta.discourse.org/t/adding-members-to-groups-via-csv/34298/1 "2015-10-09T03:41:34Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [October 9, 2015, 4:25am UTC](https://meta.discourse.org/t/adding-members-to-groups-via-csv/34298/2 "2015-10-09T04:25:27Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Joey\_Tuan](https://avatars.discourse-cdn.com/v4/letter/j/db5fbb/32.png) [@Joey\_Tuan](https://meta.discourse.org/u/Joey_Tuan)
#### Post date: [October 9, 2015, 4:48am UTC](https://meta.discourse.org/t/adding-members-to-groups-via-csv/34298/3 "2015-10-09T04:48:29Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [October 9, 2015, 6:20am UTC](https://meta.discourse.org/t/adding-members-to-groups-via-csv/34298/4 "2015-10-09T06:20:41Z")

</div>

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

---

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [October 11, 2015, 3:11am UTC](https://meta.discourse.org/t/adding-members-to-groups-via-csv/34298/5 "2015-10-11T03:11:10Z")

</div>

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

[https://github.com/vindia/discourse\_user\_importer](https://github.com/vindia/discourse_user_importer)

---

<div class="post-metadata">

### Author: ![myronb](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@myronb](https://meta.discourse.org/u/myronb)
#### Post date: [October 11, 2015, 5:03am UTC](https://meta.discourse.org/t/adding-members-to-groups-via-csv/34298/7 "2015-10-11T05:03:30Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [October 9, 2023, 12:10pm UTC](https://meta.discourse.org/t/adding-members-to-groups-via-csv/34298/9 "2023-10-09T12:10:34Z")

</div>



---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [October 9, 2023, 12:16pm UTC](https://meta.discourse.org/t/adding-members-to-groups-via-csv/34298/10 "2023-10-09T12:16:23Z")

</div>


