+

Search Tips   |   Advanced Search

Remove members from communities

Use administrative commands to remove specified users from the membership of their communities and subcommunities.

To use administrative commands, use wsadmin.sh. The administrative commands for removing members from communities and subcommunities do not require a server restart to take effect and no file checkout is necessary.

When employees leave the organization or no longer require access to communities for some other reason, we can remove them from the membership of communities and subcommunities. We can remove specified community members based on their email address or name.

To remove a specified user from the membership of a community or subcommunity.

  1. Start the Communities Jython script interpreter

      cd app_server_root/profiles/Dmgr01/bin
      ./wsadmin.sh -lang jython
      execfile("communitiesAdmin.py")

  2. Use one of the following commands:

    CommunitiesService.removeAllMembershipByDirectoryUuid(String directoryUuid, String orgId)

    Remove the specified user from any communities and subcommunities to which they belong.

    The command takes the folloowing parameters:

    directoryUuid

    A string that specifies the directory UUID (external ID) of the user whose membership to remove.

    If the user is the last owner of a community or subcommunity, they are not removed, and the community or subcommunity is included in the return value for this call. Returns a vector of hash maps of all the communities and subcommunities where the user was not removed because they are the last owner.

    To obtain the directory UUID to use as input into this command, use one of the following commands. Both commands return the user's external ID.

    • CommunitiesMemberService.getMemberExtIdByEmail("email")
    • CommunitiesMemberService.getMemberExtIdByLogin("login")

    For example:

      CommunitiesService.removeAllMembershipByMemberUuid("91b3897d-b4f8-4d05-3621-50bcaa22d300")

    CommunitiesService.removeMembersFromCommunityByEmail(String communityName, List emailAddresses, String orgId)

    Removes members from an existing community or subcommunity. Members are identified in a list by their email addresses.

    We can remove both owners and members, but we cannot remove the last active owner. We can remove members from a subcommunity, but we cannot remove owners from a subcommunity.

    If an email address in the list does not match any member email address in the community then the command fails and none of the members in the list are removed from the community.

    Use this command in two steps. First, create a comma-separated list of users (using their e-mail addresses) who to remove from an existing community or subcommunity, and assign this list to a variable.

    For example:

      wsadmin>threemembers=["alex_jones@myco.com", "mary_smith@myco.com", "paul_henderson@myco.com"]

    Then, use this variable as input into the removeMembersFromCommunity command.

    For example:

      wsadmin>CommunitiesService.removeMembersFromCommunityByEmail("Ski Club Community",threemembers)

    Note that communityName is a string and must be enclosed in quotation marks ("). This parameter is case-sensitive so specify the name of the community or subcommunity exactly.

    CommunitiesService.removeMembersFromCommunityByMemberUuid(String communityName, List UUID of member)

    Removes members from an existing community or subcommunity. Members are identified in a list by their external ID. Use this command to remove users from a community's membership list, but they do not have an email address.

    We can remove both owners and members, but we cannot remove the last active owner. We can remove members from a subcommunity, but we cannot remove owners from a subcommunity.

    If a UUID in the list does not match any member UUID in the community then the command fails and none of the members in the list are removed from the community.

    To obtain the directory UUID to use as input for this command, use one of the following commands. Both commands return the user's external ID.

    • CommunitiesMemberService.getMemberExtIdByEmail("email")
    • CommunitiesMemberService.getMemberExtIdByLogin("login")

    Use this command in two steps. First, create a comma-separated list of users (using their UUID, the external LDAP ID) who to remove from an existing community or subcommunity and assign this list to a variable.

    For example:

      wsadmin>onemember=["84b4897d-b4f8-4d95-9621-50bcaa2fd3ca"]

    Then, use this variable as input in to the removeMembersFromCommunityByMemberUuid command.

    For example:

      wsadmin>CommunitiesServiceg.removeMembersFromCommunityByMemberUuid("Ski Club Community", onemember)

    Note that communityName is a string and must be enclosed in quotation marks ("). This parameter is case-sensitive so specify the name of the community or subcommunity exactly.


Parent topic:
Manage membership in Communities


Related:

Manage users


Related:

Add owners and members to a community

Add an alternate owner to Communities