function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Lasith SameeraLasith Sameera 

Retrieving allowed users for security related objects

Hi,

This is somewhat related to the question I asked in,
https://success.salesforce.com/answers?id=90630000000hzmDAAQ

I am planning to get read access for object with following query,

queryResults = connection.query("SELECT Assignee.Id, Assignee.Name" +
          " FROM PermissionSetAssignment" +
          " WHERE PermissionSetId" +
          " IN (SELECT ParentId" +
          " FROM ObjectPermissions" +
          " WHERE SObjectType = GivenObjectType AND" +
          " PermissionsRead = true)");

This is working for most of the salesforce objects. But for security related objects such as Users, Groups, Profiles this is not working.  (i.,e when I want to check users who can see user information, I should be able to pass GivenObjectType="User" and get all the users who can see other user's information.

Is there a way that I can achieve this?

Note: I identified following object types that doesn't have support in ObjectPermissions.SObjectType
User, Group, Partner, Profile

Thanks!
Lasith SameeraLasith Sameera
Any support on this?