Manage public group membership using Data Loader.
Data Loader can be used for mass membership changes to Public Groups.
If you would like to get instructions on how to access and use Data Loader, please review Data Loader.
NOTE: To log into Sandbox org: Click on Settings-->Settings on Data Loader's main screen (cancel any function to get to it) and change the "Server Host" field to https://test.salesforce.com - then be sure to switch it back to https://www.salesforce.com or just blank it out for production org connections.
In the Data Loader, log in to your Salesforce Org using your username and password.
** EXTRACT GROUP MEMBER LIST **
Use the Export function as follows to extract a list of all current members of a group:
Click on the check box to Show ALL Salesforce objects and select the object "Group Member".
Select Fields: Id, GroupId, UserOrGroupId
Set the SOQL filter to GroupId <equals> then cut and paste the 15-char Group record Id from the URL of that Salesforce Public Group AND click the "Add Condition" button to use that filter. Step through the remainder of the Data Loader wizard.
View results in an external app (Excel, CSV)
** REMOVE GROUP MEMBERS **
WARNING: THIS IS DESTRUCTIVE - Use with caution.
To remove users from a public group in mass, start up the Data Loader, log in to your org, then select the Delete function.
Modify your CSV file to have the Id of the public group member(s) to be deleted, that is all.
IMPORTANT: This is the Id from the Group Member export extraction. Be sure not to use the Id from Group or User records.
Continue through the Data Loader wizard to process the request.
WARNING: DO NOT use the GroupId or UserOrGroupId as this would DELETE actual Groups and/or Users.
** ADD GROUP MEMBERS**
To add new members to a public group, create a CSV file with column headings from the Export extraction above.
Remove the Id column (this is created by the Insert function).
Put the 15-char record id from the URL for the Group into the GroupId column.
Put the 15-char record id from the URL for the User record into the UserOrGroupId column.
Then continue through the Data Loader wizard including mapping fields.
See also
Insert, Update, or Delete Data Using Data Loader
000385341

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.