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.
Hi Shankar, Our instance is Not on prem. We have a cloud instance and do not have database access to run SQL. Hence unable to do this.
Any other suggestion?
Hi Kaizad,
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
-Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Can you try this SQL command to see if it gives what you wanted?
select * from cwd_user where user_name not in (select child_name from cwd_membership where parent_name not in ('jira-software-users'));
-Shankar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.