Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to get a list of groups that a user belongs to using jira rest api?

Hello, I am using jira server and I want to get a list of the groups that a user belongs to based on the username or user email. According to this documentation:

 https://docs.atlassian.com/software/jira/docs/api/REST/8.13.1/#api/2/user-getUser

 I should get such a list of groups when I call the Get User endpoint. However unlike the documentation, I have an empty "items" field in the response body. Is there a way to solve this or any way to get this list of groups? Thank you.

 

Screenshot from 2020-11-25 12-25-49.png

2 answers

Hi @Andrei Iorga ,

I am not sure, but can it be the case that it requires the requestor of the REST call to have admin rights? That is, if you are not admin, jira does not allow to view groups of another user.

Hi @Bloompeak Support  thank you for your answer. I have tried the REST with a requestor with admin rights and the response is the same.

0 votes
Daniel Ebers Community Leader Nov 28, 2020

Hi Andrei,

not the first time this was mentioned but too early to give up.

It was said that this works instead:

/rest/api/2/user?username=username&expand=groups

Could you please try?

Thanks,
Daniel

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Posted in Jira Software

Presenting the "Best of 2020" Jira Software roundup!

Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...

7,193 views 8 28
Join discussion

Community Events

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

Events near you