Is it possible to create private chatter groups for a community and make them visible to guest users?

This class only returns public groups for guest users even without sharing:

public without sharing class GroupsController {
    public static List<CollaborationGroup> getGroups() {
        return [select id, title from CollaborationGroup where NetworkId = ''];

My intention is to "advertise" the groups publicly but keep membership (ie., ability to see feed and post) subject to approval by individual group owners.


I think I would create a custom object (CollaborationGroupSuggestion maybe?) that has a lookup to the name field in CollaborationGroup.

Then I only know how to access the guest user profile from Site Studio. Once in Site Studio:

  1. On the Overview tab, click Site Configuration.
  2. Click the link next to Guest User Profile (will be named after your community)

In here you should be able to modify custom object access by the guest user.

| improve this answer | |

Have you tried querying for the NetworkId of the Community they are in? A guest user has a special guest user profile that is still part of the community they are visiting.

An Internal Group will have no NetworkId, a Community group will have one. The query you are using would advertise groups that aren't available to them anyway

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.