Display users in confluence groups



I am using the user macro below (thanks Davin).


Is it possible expand on this macro and display the users contained in a specified group?


## Developed by: Davin Studer
## Date created: 04/21/2015
## @noparams
#foreach($group in $userAccessor.getGroups())


Thanks for any help!

2 answers

1 accepted

2 votes
Accepted answer


          Please find a possible solution mentioned in the link mentioned below



Hope this helps.


Chander Inguva

ah brilliant, thank you!


I think you may need to use the getMembers() method: https://docs.atlassian.com/confluence/latest/com/atlassian/confluence/user/UserAccessor.html#getMembers(com.atlassian.user.Group)

Haven't tested this but it would probably go something like this:

## @param Group:title=group|type=string|required=true|desc=Group name

#foreach($group in $userAccessor.getGroups())
#if($group == $paramGroup)
#foreach($user in $userAccessor.getMembers($group))


Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Organizing your space just got easier - Page Tree Drag & Drop is here

Hi Community! I’m Elaine, Confluence Product Manager. You may have read my earlier post about page tree in space navigation sidebar. I'm excited to share another improvement that helps you organize ...

66 views 3 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you