I'm trying to get all sites for a user on which he has permissions. For this I'm using the search api. In a for-loop from 0 to totalRows. This is my request url:

https://www.intranet.i/site/_api/search/query?querytext='contentclass:STS_Web'&selectproperties='Title,URL'&startrow=" + i + "&rowlimit=100"

This is working fine for a lot of pages, but some are not returned, any idea why?

Thanks in advance!

  • How were you able to solve this? No answer for this question works for me. I only get a subset of lists. I don't even some Sites for which I am the owner. Strange! Aug 1, 2015 at 10:51

2 Answers 2


Try adding '&trimduplicates=false' to your query.

https://www.intranet.i/site/_api/search/query?querytext='contentclass:STS_Web'&selectproperties='Title,URL'&startrow=" + i + "&rowlimit=100&trim"
  • Still doesn't give the desired results? I have some Site Collections where I am the Primary Site Admin, I still don't get those Site Collections in this API call? Any suggestions? Aug 1, 2015 at 8:45

Try adding


in your query along with web since the permissions may differ

  • Still doesn't return all. Any other solution? Aug 1, 2015 at 10:50

Your Answer

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

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