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

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

1 vote
Davin Studer Community Champion Apr 21, 2015

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>

Nice one, Davin! :)

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

Bob

 

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()
	}
}

 

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,147 views 20 14
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