Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,366,952
Community Members
 
Community Events
168
Community Groups

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

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

3 answers

1 accepted

0 votes
Answer accepted

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.

Hahahahaha is this still the most legit answer? 

Like # people like this

unfortunately yes.

Atlassian just doesn't care apparently

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

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!

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

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.

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. 

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")

}

}

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

Many thanks for sharing :) 

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

 

Looking at it. Thanks for the suggestion.

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!

Suggest an answer

Log in or Sign up to answer