Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to see all groups I'm a part of (via API)

Bianca Fialho December 27, 2022

Hello everyone!

I'm working on a behavior from scriptrunner on cloud, which would set a summary depending on the group the current user is a part of.

For that, I'm calling a request for the jira api, specifically the myself endpoint: /rest/api/3/myself

But even though I'm admin and have all permissions in the instance, the response returns empty brackets when it comes to groups, like so:

"groups": {
        "size"5,
        "items": []
    },
I'd like to understand why I can see the number of groups I'm part of, but not any additional info in 'items', and is there any way to know which groups the current user is part of via rest api?

Thank you!!

1 answer

1 accepted

3 votes
Answer accepted
Alex Koxaras -Relational-
Community Champion
December 27, 2022

Hi @Bianca Fialho 

Try 

/rest/api/3/myself?expand=groups

Let me know if that worked for you :)

Bianca Fialho December 27, 2022

Like a charm =) thank you Alex!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
atlassian, jira product discovery, jpd premium, product management, idea management, product discovery, jira premium, product planning, atlassian community, product development, roadmap planning, product prioritization, feature management

Introducing Jira Product Discovery Premium ✨

Jira Product Discovery Premium is now available! Get more visibility, control, and support to build products at scale.

Learn more
AUG Leaders

Atlassian Community Events