Finding group members in all communities
Chad Scott 110000E1UB Visits (4361)
A colleague asked me today how to come up with a list of all communities with group members. I started trying to script this with a Jython command to run via wsadmin but discovered that there doesn't seem to be a way to distinguish ordinary users from group users in the data that comes back from the various CommunitiesService facilities. However, we can get this information from the database. The request was only for a list of communities, but I expanded it to be a list of community:group pairs.
select community.name as Community, groupmember.name as Group
An example run looks like this: