t-kitamura's avatar
t-kitamura
Copper Contributor
Jun 29, 2022
Status:
New

Address problems with Sharepoint site search in Graph API and refine the `search` specification

Regarding SharePoint site searches in the Graph API, we have received several reports of sites not being found, even though they exist on Sharepoint Online.

 

https://docs.microsoft.com/en-us/answers/questions/904313/how-to-search-all-sites-with-graph-api.html

 

The official documentation for `https://graph.microsoft.com/v1.0/sites?search={query}` is vague and seems to confuse many users.

 

https://docs.microsoft.com/en-us/graph/api/site-search?view=graph-rest-1.0&tabs=http

 

https://docs.microsoft.com/en-us/graph/api/resources/sharepoint?view=graph-rest-1.0#%20note-for-existing-sharepoint-developers

 

We would appreciate an investigation into the event of the site not being hit by the search and the detailed specification of the free text search at `https://graph.microsoft.com/v1.0/sites?search={query}` to be made available to the documentation.

 

1 Comment

  •  Also i would recommend support for filtering using all attributes of Site object.

    Currently filtering is only possible by displayname (* or keyword*(works as startswith)) and id (by giving the SPSiteId), but that too using search parameter

    Apart from search=*, few filters supported working are listed below.

    for siteId,

    https://graph.microsoft.com/v1.0/sites?search={SPSite-Id} is working.

    for displayname,

    https://graph.microsoft.com/v1.0/sites?search={*}  or https://graph.microsoft.com/v1.0/sites?search={<firstfew letters of any word in displayname>*)  is working.