how can i pull user permission for all users using sql or anyother way

Anirudh Pratap Verma March 21, 2024

Hi,

 

We are on JIRA DC (9.4.18 version). How can I pull user permission for all users using SQL or any other way?

 

We want a view where if I select a user then I should be able to see

  • which project he is added into

  • what permissions does he have

  • what all groups he is added into

 

Thanks,

3 answers

1 vote
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 21, 2024

Hello @Anirudh Pratap Verma 

What you are asking for is actually extremely complex. Have you considered all the ways a user could have been added to a project, added to a group, and granted permissions?

 

  • which project he is added into

A user can be "added to a project" in multiple ways:

  1. explicitly as an individual to a role
  2. explicitly added to a group that is added to a role
  3. added to a group that is nested under another group that is added to a role

 

  • what permissions does he have

A user can be allocated permissions in a project in multiple ways because permissions can be granted in multiple ways:

Screenshot 2024-03-21 at 3.54.16 PM.png

In the case of the Project Role and Group options above, the user could be a "member" directly or indirectly. With the use of everything from Reporter down you have to consider that the field values can change over time, so a user's permissions related to a specific issue in a project can also change over time.

 

  • what all groups he is added into

Do you mean added to directly, or do you also want the ones to which the user is added indirectly by being a member of a group that is a member of a group?

Are you using only local groups, or are you integrated with an external Identity Provider like Active Directory?

-------------------

You may want to instead investigate one of the third party apps that helps with auditing user permissions. Here is a search from the Atlassian Marketplace to help you get started.

https://marketplace.atlassian.com/search?hosting=dataCenter&product=jira&query=user%20audit

0 votes
Anirudh Pratap Verma March 21, 2024

and this information is needed for all the users in jira.

0 votes
Martin Hilbig _GC Gruppe_ March 21, 2024

if you want to get your data from the db directly, i'd start with the schema here: Database schema (atlassian.com)

 

you can alternatively see if your requirements can be satisfied using rest api endpoints: https://docs.atlassian.com/jira-software/REST/latest/

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events