I need to extract a list of users who are ONLY in the default jira-users and no other groups.
By default, all users get added to the default jira-users group; and then we add them to further groups. I want a list where a user is just in this default group and not yet added to any other group.
You can leverage the power of JIRA CLI commands to get the list of users in a group and also multiple groups for a single user as well. The CLI can do lot more other things as well. See the examples here.
To get the list of all users,
jira.sh --action getUserList --name "@all"
you can get all user names from the database and route them a file.
To get the lists of user groups (membership) , I am sure they belong to at least 1 group (which is jira users default group)
jira.sh --action getUser --userId "$username" | grep "Group"
You can only return values(users) whose count is not more than 1 (it should be default group)
jira.sh --action getUser --userId "$username" | grep "Group" | wc -l
Hope this helps
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events