2

I have an user who is not able to view the SSN field whereas he had access to view the SSN field before. It appears that the "View Encrypted Data" permission has been revoked for him. The profile of the user never had this permission and hence this permission was given to him via a permission set. Is it possible to query the profiles/permissionsets/userlicense or other objects to find which permissionset gave the user the "View Encrypted Data" permision?

1 Answer 1

4

The permission is named as PermissionsViewEncryptedData

You can find out the PermissionSet name by running this query

SELECT ID,NAME, PermissionsViewEncryptedData FROM PermissionSet WHERE PermissionsViewEncryptedData=TRUE

Also Same Applies for Profile

SELECT ID,NAME, PermissionsViewEncryptedData FROM PROFILE WHERE PermissionsViewEncryptedData=TRUE

UPDATE: Based on your Comments

You can do that by Querying PermissionSetAssignment, PermissionSetAssignment is the Junction between User and the PermissionSet.

SELECT ID, PermissionSet.Name, PermissionSet.PermissionsViewEncryptedData  FROM PermissionSetAssignment WHERE AssigneeId='005UserId' AND  PermissionSet.PermissionsViewEncryptedData =TRUE
2
  • I have already tried this query and this gives a list of permissionsets where the the "View Encrypted Data" permission is set. However, in our Org, this query returns more than 30 permissionsets, which is why I posted the question. I need to find out the list of permissionsets that this user is part of. Commented Jan 17, 2019 at 19:24
  • @BalajiPooruli You can do that querrying PermissionSetAssignmet . I have updated my answer for refrerence Commented Jan 17, 2019 at 19:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .