0

Is there a SOQL query or a method to extract all users, their profiles and group membership from Salesforce?

0

There is no straight forward way to export all the info in one go. You can export Users, and their profile info in one query and users/group membership in another query, then join the info based on the User id.

This gives users and profile info:

select
    Id,
    Email,
    Name,
    Profile.Name
from User

This gives UserIds, and their Groups List:

 select
    UserOrGroupId,
    Group.Name
 from GroupMember
 where UserOrGroupId in (select id from user)

Now you need to combine these two datasets based on the Id.

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.