1

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?

2

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
  • 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. – Balaji Pooruli Jan 17 '19 at 19:24
  • @BalajiPooruli You can do that querrying PermissionSetAssignmet . I have updated my answer for refrerence – Pranay Jaiswal Jan 17 '19 at 19:31

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.