Is there a way to add a bunch of users to a group? We're using Cloud.

John Wilson
Contributor
January 29, 2018

I need to add over 700 people to a few groups. I have their account names in a list. Is there a way to add them in bulk? (I don't want to have to add them one-by-one!)

I've seen some possible solutions for people on the Server version, but we're on the Cloud version.

Thanks, 

John Wilson

7 answers

1 accepted

0 votes
Answer accepted
John Wilson
Contributor
January 31, 2018

That was the answer we needed – submit an Atlassian support ticket with an attached CSV file. They will import it and upload it into your Cloud instance. It should have the form: 

Username,Groupname
user1,jira-administrators
user 2,confluence-users
user3,JIRA Users
user3,confluence-users

I created the groups ahead of time. Don't know what would have happened if they didn't exist yet.

thomas britton
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 28, 2021

Hahahahaha is this still the most legit answer? 

Like # people like this
lorenz-wellmer April 27, 2021

unfortunately yes.

Atlassian just doesn't care apparently

Like Adam Hoover likes this
Mark Burgess
Contributor
December 16, 2021

That isn't a very sustainable way to maintain a user-base. Atlassian, this is a great enhancement request to enable your Cloud users to maintain their users on their own. 

Like # people like this
Felipe Oliveira
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 21, 2022

Hello!

Felipe from Atlassian support here. Just wanted to share that we do make available an API endpoint for both Jira and Confluence to manipulate group assignments within the sites and thus making it possible from our customers to manage user group assignments on their own.

Cheers!

Like Aaron likes this
Anthony Kroeker March 31, 2022

The Jira Cloud API link above is showing as deprecated, is there a newer link?

Tyler B [Atlassian]
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 2, 2022

Hey all,

Felipe's link to the Jira API is still valid and up-to-date. One endpoint is now deprecated, but the rest of the endpoints are not.

It is also possible to provision users to groups in bulk using the user provisioning service offered with Atlassian Access. More details on user and group provisioning here and more about Atlassian Access here.

Like Aaron likes this
Kathy Barton
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 9, 2022

I've been a Jira admin for over 15 years now and it's amazing to me how many features we've had for years are disappearing. I wonder if the "don't &%^!@ the customer" banners at home office have come down. 

Like # people like this
William Wilson
Contributor
April 19, 2023

No, they have not. It has become abundantly clear that they will REMOVE any core feature that they think they can get away with pushing into the marketplace. Because, you know.. after the licensing fees, they want another cut.

Remove borders around a table in a wiki product? We used to be able to do that. Now, if you want to remove a border from a table once or twice a year, it will cost you extra.

Want a more robust search functionality? Not in the core product. You can input data and get a rudimentary search, but if you want anything fancy? Pay for it!

It's greedy. It's ugly. And it's exhausting. Not to mention, at some point, it will kill the company.

There's some discussion on another thread about a get together to celebrate the 20th anniversary of a feature request that is still "gathering interest"... It will be in 2024. Anyone interested can email me at theantifabrication@gmail.com. I'm slowly working on things like an eventful page, etc. 

I'm hoping that maybe, if we can take a humorous jab at a clear problem, then maybe the issue will get recognized and Atlassian Mgmt will pull their heads out of their asses. 

Like Florian Sauter likes this
1 vote
Arek Fedorowicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 3, 2023

Hi,

pasting in case anyone should need this - Bulk add users to groups using Python and API

Kind Regards,

Arek

Jose Ramirez
Contributor
November 3, 2023

This approach requires the usedID and GroupID. I created a version below that uses the email and the Group Display Name, that's easier.

 

I can send the files if someone is interested.

Like # people like this
0 votes
Imdad KP
Contributor
January 9, 2024

@John Wilson 

You can done this using python script

0 votes
varatha October 11, 2023

Please let me know the answer for server version?

0 votes
Angeline Ygrubay
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 13, 2023

This issue seems closed already, but I'd like to add.

I was able to do this by using JIRA's Add User to Group API:
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-groups/#api-rest-api-3-group-user-post

+

Running it in postman using CSV as data.

 

Hope this helps.

0 votes
Vijay Sv
Contributor
May 5, 2021

If you have a scriptrunner try this...

 

import com.atlassian.jira.component.ComponentAccessor


def userUtil = ComponentAccessor.userUtil
def userManager = ComponentAccessor.userManager
final String groupName = "GROUPA" // the group you want to add users
def group = ComponentAccessor.groupManager.getGroup(groupName) // user names of the users to add
final List<String> userToAdd = ["USR1", "USR2", "USR3"]


userToAdd.each {
def usertoadd = userManager.getUserByName(it)
if (!usertoadd) {
log.warn("User: $userToAdd doesn't exist")
return

}

if (ComponentAccessor.getGroupManager().getGroupsForUser(usertoadd).contains(group)) {
log.warn("User: $usertoadd.username already in the group: $groupName")
return

}

if(!group) {
log.warn("Group: $groupName doesn't exist")

} else {

userUtil.addUserToGroup(group, usertoadd)
log.warn("User: $usertoadd.username added to the $groupName")

}

}

Athar Agha September 13, 2022

Sorry to necro an old thread, but this is exactly what I was looking for!

Many thanks for sharing :) 

Like Polina Semykina likes this
0 votes
Tony Pham
Contributor
January 29, 2018

John,

Please check out the CLI (Command Line Interface) tools from Bob Swift. It will allow you to perform many bulk operations for the Atlassian tools.

 

https://marketplace.atlassian.com/search?_ga=2.139201206.408359524.1517235793-735088774.1510598772&query=cli

 

John Wilson
Contributor
January 29, 2018

Looking at it. Thanks for the suggestion.

John Wilson
Contributor
January 31, 2018

Thanks for the suggestion, Tony. Those tools may work, but they have a large cost at our level of licenses. 

I found a couple of other options. The best one was to submit a support ticket to Atlassian. They said to send them a CSV file with the usernames and Jira group names. From the support tech's email:

"The CSV should have the structure below:

Username,Groupname
user1,jira-administrators
user 2,confluence-users
user3,JIRA Users
user3,confluence-users"

I sent it to them, they imported them, and we're done!

Thanks Atlassian!

Jose Ramirez
Contributor
October 23, 2023

I created a Python script that takes a list of emails as a Txt file and adds the users to a group. Works well for hundreds of users. If you are interested, I can send you the scripts and required files. as a compressed file. My email is jose.ramirez@kaplan.edu.

Like # people like this

Suggest an answer

Log in or Sign up to answer