I want to retrieve all the library items of a content type "Prod Request". I am using REST API.

Here is my query:

    url: https://mysite.domain.com/_api/search/query?querytext='contenttype:Prod Request'&rowlimit=100&trimduplicates=false&selectproperties='Title',
    method: "GET",
    headers: { "ACCEPT": "application/json;odata=verbose" 
    success: function (data) {...........

The problem which I am facing is if I login with Farm account it return all results(5000 items) but if I login with SiteCollection Admin account it only returns 35 items and do not return other items to which site collection admin has access.

Please assist.

1 Answer 1


REST API calls are still based on permissions as to what you will be able to use when it is invoked. This sounds like a permissions issue. You are SCA sure but you do not own the WFE. So this is why the Farm Admins can see everything and SCA cannot.

We can map user permissions with role definitions

  1. Full Control - Has full control - User can make any call under endpoint "_api/web"

  2. Edit - Can add, edit and delete lists; can view, add, update and delete list items and documents. - User Can do any operation on list and list items and end point would be "_api/web/Lists"

  3. Read - Can view pages and list items and download documents. - User can do Get operations on list items and end point would be "_api/web/Lists/getByTitle('')/Items

Since your call is just using the _api endpoint, the permissions go up just like the others. You will not be able to see anything as SCA unless it is using the _api/web end point. At least not everything.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.