Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Release bulk of users

Mohamed Saad Taha
Contributor
July 24, 2025

Dears,

 

is there any way to remove jira license from bulk of users one time even using script runner  

1 answer

1 accepted

5 votes
Answer accepted
Evgenii
Community Champion
July 24, 2025

Hi, @Mohamed Saad Taha 

You can bulk remove users from the group that grants access to the application — typically jira-software-users, though this may vary if the admin has customized it.

This can be done using a simple ScriptRunner script. In the script, you define a list of users and then remove each one from the group programmatically.

Evgenii
Community Champion
July 24, 2025

If you have list of usernames:

import com.atlassian.crowd.embedded.api.Group

List
usernames = ["user1", "user2", "user3"]
Group baseGroup = Groups.getByName("jira-software-users")

usernames.each { String username ->
    baseGroup.remove(Users.getByName(username))
}


If you want to remove everyone from group:

import com.atlassian.jira.user.ApplicationUser
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.crowd.embedded.api.Group

Group baseGroup = Groups.getByName("jira-software-users")
Collection allUsersInGroup = ComponentAccessor.getGroupManager().getUsersInGroup(baseGroup)

allUsersInGroup.each { ApplicationUser user ->
    baseGroup.remove(user)
}

 

Like # people like this
Mohamed Saad Taha
Contributor
July 24, 2025

Hello @Evgenii 

 

thank you so much it works fine

import com.atlassian.crowd.embedded.api.Group

List
usernames = ["user1", "user2", "user3"]
Group baseGroup = Groups.getByName("jira-software-users")

usernames.each { String username ->
    baseGroup.remove(Users.getByName(username))
}
Like Evgenii likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
10.4.1
TAGS
AUG Leaders

Atlassian Community Events