Ask Search:
Mariel EspinalMariel Espinal 

How to add profile name to a PermissionSet Assignment object SQL query

I would like to add the names of the profiles assigned to the "assignees" and would also like to filter out our community profiles from this query. The point of this query is to show me all deactivated users (except the ones with community profiles) who are not active but still have permission sets assigned to them.

This is what I have come up with:
Select ID, Assignee.name, AssigneeId, permissionSet.Name from PermissionSetAssignment where Assignee.isActive = false
Best Answer chosen by Mariel Espinal
Lalit AroraLalit Arora
Try Adding this:

Assignee.profile.name 

All Answers

Lalit AroraLalit Arora
Try Adding this:

Assignee.profile.name 
This was selected as the best answer
Mariel EspinalMariel Espinal
Thank you Lalit! That is exactly what I needed :)