0
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 ?

1 Answer 1

0

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

3
  • Yes you are right this is absolutely working as expected using workbench but when tried the same with php curl and it's giving me the error..
    – Nail David
    Commented Aug 21, 2017 at 12:55
  • 1
    Please check curl end point and headers and match with Workbench, there must be a difference @NailDavid
    – Ashwani
    Commented Aug 21, 2017 at 14:26
  • 1
    @NailDavid PermissionSetAssignment is available in 22.0 and higher; it is most likely that you didn't set the version correctly in your PHP code. 22.0 or any higher version would suffice.
    – sfdcfox
    Commented Aug 22, 2017 at 6:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .