简体   繁体   中英

Microsoft Graph API SharePoint search

I have been trying to search through my SharePoint site. I am able to get results for a single drive:

xxx.sharepoint.com,xxxxxx-xxxx-xxxx-xxxx-xxxxxx,xxxxx-xxxx-xxxx-xxxx-xxxxxx/drives/xxxxxxxxx/search(q='{content}')

But if I do the same search at drive/root , I don't get any result:

xxx.sharepoint.com,xxxxxx-xxxx-xxxx-xxxx-xxxxxx,xxxxx-xxxx-xxxx-xxxx-xxxxxx/drive/root/search(q='{content}')

We basically want to perform a search across the entire subsite.

Hey a bit late but I've just discovered you can use the /sites endpoint to retrieve all items in a site by expanding relationships of graph objects. Could you try use:

https://graph.microsoft.com/v1.0/sites/root/sites ?$expand=lists($expand=items)

This seems to return all list items in all subsites under the root site. You should hopefully then be able to to filter further by subsite, list, field values etc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM