To find Permissions giving Read access on any particular object:
SELECT Id, SObjectType, PermissionsRead, Parent.label, Parent.IsOwnedByProfile FROM ObjectPermissions WHERE (PermissionsRead = true) AND (SobjectType = ‘CustomObject__c’)
To find Permissions giving Read access on any particular object:
SELECT Id, SObjectType, PermissionsRead, Parent.label, Parent.IsOwnedByProfile FROM ObjectPermissions WHERE (PermissionsEdit = true) AND (SobjectType = ‘CustomObject__c’)
To find Read permissions for any user on any particular Object:
SELECT Id, SObjectType, PermissionsRead, Parent.label, Parent.IsOwnedByProfile FROM ObjectPermissions WHERE (ParentId IN (SELECT PermissionSetId FROM PermissionSetAssignment WHERE Assignee.Name = ‘Kerry Miller ‘)) AND (PermissionsRead = true) AND (SobjectType = ‘CustomObject__c’)
To find all Users who has Modify All access on Case object
SELECT AssigneeId, PermissionSetId,PermissionSet.Name
FROM PermissionSetAssignment
WHERE PermissionSetId
IN (
SELECT ParentId
FROM ObjectPermissions
WHERE PermissionsModifyAllRecords = true
AND SObjectType = ‘Case’
)
To find Field Permission only on Permission Sets
SELECT Id, ParentId, Parent.Name,SobjectType, Field, PermissionsEdit, PermissionsRead FROM FieldPermissions WHERE SobjectType = ‘Opportunity’ AND Field=’Opportunity.ARR__c’ and Parent.IsOwnedByProfile = false ORDER BY SObjectType, Field
To find Read permission of the Field
SELECT Id, ParentId, Parent.Name, SobjectType, Field, PermissionsEdit, PermissionsRead FROM FieldPermissions WHERE SobjectType = ‘CustomObject__c’ AND Field = ‘CustomObject__c.CustomField__c’ AND PermissionsRead= true ORDER BY Parent.Name