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.
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
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 @Mehmet A _Bloompeak_ thank you for your answer. I have tried the REST with a requestor with admin rights and the response is the same.
I tried and it worked for me. /rest/api/2/user?username=username&expand=groupsI'm running 18.22.3 and I'm an admin.
Yeah the question was asked 2 years ago but, believe me, it's still relevant.
Thanks Daniel!
Dave
It looks like you're new here. Sign in or register to get started.