[SalesForce] sObject type ‘PermissionSetAssignment’ is not supported

SELECT AssigneeId,Id,PermissionSet.Name FROM PermissionSetAssignment WHERE AssigneeId = '< id >' AND PermissionSetId = '< id >'

On firing above query using API (/services/data/v20.0/), i am getting error mentioned below:

Array(
[message] => sObject type 'PermissionSetAssignment' is not supported
[errorCode] => INVALID_TYPE )

I have tried changing the API versions like (/services/data/v22.0/) and (/services/data/v40.0/) but no luck…

what do i need to change in salesforce ?

Best Answer

Try below callout URL:

/services/data/v39.0/query?q=SELECT+AssigneeId,Id,PermissionSet.Name+FROM+PermissionSetAssignment

With Id:

/services/data/v39.0/query?q=SELECT+AssigneeId,Id,PermissionSet.Name+FROM+PermissionSetAssignment+WHERE+id='0Pa300000000pVsCAI'

It works perfect in workbench. You may be providing binding in wrong way. Check that as well.

enter image description here

Related Topic