I'm looking to find all names of profiles in a certain permission set. Preferably, I would like to do this in one SOQL query.
For example, I have permission set 1 and in 1, there are 5 users with profiles:
A, A, B, C, D
I want to see a SOQL query that will summarize that in permission set 1, there are profiles A, B, C, and D.
This is what I have so far:
SELECT Assignee.Id, Assignee.Name, Assignee.Profile.Name, PermissionSet.Id, PermissionSet.Name
WHERE PermissionSetId IN
(SELECT Id FROM PermissionSet WHERE Id=PERMSET1 OR Id = PERMSET2 OR Id = PERMSET3 OR Id = PERMSET4)
When I run this in Developer Console, I see that
Assignee.Profile returns an [object Object] and I can't see the column with
Assignee.Profile.Name. Also, I'm stuck at this step and I don't know how to group all profile names together.