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
Test User 1040Test User 1040 

how to query permission set of particular profile

Hi all,

I want to know if there is a way to query permission set from a particular profile and get the first value from the list of that query.

Thanks in advance.
Best Answer chosen by Test User 1040
SandhyaSandhya (Salesforce Developers) 
Hi,

You can try below query
SELECT Id, PermissionSetId, PermissionSet.Name, PermissionSet.ProfileId, PermissionSet.Profile.Name, AssigneeId, Assignee.Name FROM PermissionSetAssignment WHERE PermissionSet.Profile.Name = 'Sales Reps'
Refer below link.

https://developer.salesforce.com/blogs/engineering/2012/06/using-soql-to-determine-your-users-permissions-2.html
 
https://help.salesforce.com/articleView?id=000271586&language=en_US&type=1
 
http://www.simplysfdc.com/2013/06/salesforce-permission-set-report.html
 
Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
                                             
Best Regards
Sandhya