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
I tried and it worked for me. /rest/api/2/user?username=username&expand=groups
I'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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.