Silly Admin Trick: Extracting Names and Emails from Groups and Permission Sets

Filed away in theĀ “Why is this so hard?”, extracting a list of users related to a Public Group, Queue, or Permission Set in Salesforce.com is harder than it should be. Not in reporting and a pain with Dataloader and XLS. There are lots of workarounds and methods for doing this but it should be easy!

So here’s another workaround using public group as the example:

  1. Get the ID of the Group
  2. Fire up Workbench (https://workbench.developerforce.com/login.php)
  3. Queries drop down –> SOQL Queries
  4. Pick User to see the list of fields for reference
  5. Put the following in Notepad or whatever you use for scratch
  6. SELECT Name, FirstName, LastName, Business_Unit__c,Title, EMAIL FROM USER WHERE IsActive = TRUE AND ID IN (SELECT UserOrGroupId FROM GroupMember WHERE GroupId = ‘Group_ID’)
  7. If you get an error make sure your single quotes are not apostrophe’s, Evernote loves to switch those on you without asking.
  8. Under ‘View As’ select Bulk CSV so you can easily download/export the entire list

Nothing to interesting but doing the SOQL join can be tricky, left inner join for those keeping score.

Leave a Reply

Your email address will not be published. Required fields are marked *