Dears,
is there any way to remove jira license from bulk of users one time even using script runner
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.
jira-software-users
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.
If you have list of usernames:
import com.atlassian.crowd.embedded.api.GroupList 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.ApplicationUserimport com.atlassian.jira.component.ComponentAccessorimport com.atlassian.crowd.embedded.api.GroupGroup baseGroup = Groups.getByName("jira-software-users")Collection allUsersInGroup = ComponentAccessor.getGroupManager().getUsersInGroup(baseGroup)allUsersInGroup.each { ApplicationUser user -> baseGroup.remove(user)}
Hello @Evgenii
thank you so much it works fine
It looks like you're new here. Sign in or register to get started.