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, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events