Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,644,723
Community Members
 
Community Events
196
Community Groups

how can i get a listing of groups in confluence?

I want to generate a report that shows a listing of all groups in our Confluence instance.  Anyone done anything like this?

Thanks!

 

4 answers

1 vote
Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Apr 21, 2015 • edited Jul 03, 2019

You could do it with a user macro.

## Developed by: Davin Studer
## Date created: 04/21/2015
## @noparams
<ul>
#foreach($group in $userAccessor.getGroups())
    <li>$group</li>
#end
</ul>
Mallmann
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 21, 2015

Nice one, Davin! :)

Just in case the special characters in Davin's script causes issues like they did for me - this slightly changed version worked flawlessly for me (Confluence version 6.4):

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

 Thanks, @Davin Studer. Awesome little script.

Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jul 03, 2019

Yeah, unfortunately when these posts were migrated from the old Atlassian Answers site the code blocks were html encoded, which messes up the code. : (

1 vote
Mallmann
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 21, 2015

Hello Bob,

You can get a list of all group names by running a query against your database. For instance:

select group_name from cwd_group;

It's also possible to retrieve the directory name that this group comes from and other kind of information you might need.

Let me know if that helps! smile

Eduardo

0 votes
Panos
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Apr 21, 2015

similarly from the java api

public class MyClass extends ConfluenceActionSupport{
	private final UserAccessor useraccessor;
	public MyClass(UserAccessor userAccessor){
		this.useraccessor=userAccessor;
	}
	public String execute()
	{
		//do something with
		useraccessor.getGroups()
	}
}

 

 

Thanks, Eduardo!  I'll give it a shot.

Bob

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events