Need help in identifying the product role a user is granted.

Dabblu Kumar May 8, 2024

Hi All,

 

I am looking fro an API from which i can get user details and the product role granted to them.

For eg: userA has product role as "user" and product is Jira Software or userB has product role "user access admin" and product is Jira Service Management.

 

Please let me know if there is any API which can be utilize to pull the details.

 

Thanks in advance.

2 answers

0 votes
christy hernandez
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 8, 2024

Hello @Dabblu Kumar

To retrieve user details and product roles in Jira, you can utilize the Jira REST API. While there isn’t a direct API endpoint to fetch user roles along with product details, you can achieve this by combining a few API calls.

Use the /rest/api/3/user endpoint to get user details by passing the account ID.
To get the roles assigned to a user within a project, you can use the /rest/api/3/project/{projectIdOrKey}/role endpoint to list all the roles for a project and then identify the roles assigned to the user.
For detailed user information, including groups and application roles, you can expand the groups and applicationRoles in the user API call.

Please note that you may need to iterate over the users and projects to compile a comprehensive list of user roles across different products. Additionally, ensure that you have the necessary permissions to access this information via the API.

For more specific guidance, you can refer to the Jira REST API documentation or seek further assistance on the Atlassian Community forums. Remember to replace {projectIdOrKey} with the actual project ID or key and {accountId} with the user’s account ID in your API calls.

Best Regards,

Dabblu Kumar May 8, 2024

Hi @christy hernandez ,

 

I don't need project roles, I need Product roles both are different. I am looking for license consume by user .Please refer the screenshot below for better understanding.

For eg: Product is JSM and Product roles is "User(agent)".

Jira ss.PNG

Dabblu Kumar May 9, 2024

Hi All,

 

Anyone who can help?

 

0 votes
Dick May 8, 2024

Hi Dabblu,
First of all, users get a role for a given project. This means that a Jira Software user can have an administrator role in project A and a developer role in project B.

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events