I have a question around the SOQL query below.

SELECT Assignee.Name, Assignee.Profile.Name, Assignee.UserRole.Name, Assignee.Profile.UserLicense.Name FROM PermissionSetAssignment WHERE PermissionSet.Name = 'Lightning_Experience_User'

Why is it that I have to use assignee.blah and why can't I use user.blah in the query?

My query returns the result below, notice the tab shows User.Name, User.UserRole.

Whereas I can use the object API names for other objects such as Profile and UserLicense.

enter image description here

I hope that makes sense what I am trying to explain.

Thank you


1 Answer 1


PermissionSetAssignment object Represents the association between a User and a PermissionSet. This object is available in API version 22.0 and later.

PermissionSetAssignment object have the relationship field with Assignee instead of user to the user object, that is the reason you can't able to use the user in the soql query of PermissionSetAssignment object.

check the PermissionSetAssignment object Reference

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.