Using the Sharepoint REST API with a query similar to https://{tentant}.sharepoint.com/_api/v2.0/sites/{site-id}/drives/root/search(q='{text}') I can only get results from a single site/drive at a time. There is no way to directly filter by file type, modification date or any other property either.

Using Sharepoint's inbuilt search function (https://{tentant}.sharepoint.com/search/Pages/results.aspx?k=text) however offers these features. Is there a way for a user to directly search for files on all available Sharepoint sites using the REST API?


1 Answer 1


Since you are specificly searching for files I would recommend creating a tenant or web app level search result source and use that one in the rest query, setting "id= guid of that Search result source"

  • How would I query such a result source via REST on a Sharepoint 365 site? I am unable to find any documentation on this.
    – Joba
    Jun 27, 2018 at 8:13
  • Use the SourceID property and the GUID of the Result Source. Jun 27, 2018 at 13:50

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.