+ Start a Discussion
Saumya SumanSaumya Suman 

Write a Apex code to Find a Particular Permission set is assigned to which users.

srlawr uksrlawr uk
In Apex, you would want to do something like
SELECT Id, AssigneeId
FROM PermissionSetAssignment
WHERE PermissionSetId = <yourID>

Do you have the ID to hand? Or are you dynamically trying to query that too?

To put it into Apex, it'd be something like:
 
List<PermissionSetAssignment> results = [	SELECT Id, AssigneeId, Assignee.Name FROM PermissionSetAssignment
WHERE PermissionSetId = '0PS300000000000'];

for(PermissionSetAssignment thispsa : results) {
    System.debug(thispsa.Assignee.Name);
}




 
Saumya SumanSaumya Suman
thanx