I want to use the search endpoint of the Microsoft Graph API to search for documents that reside in all SharePoint sites. I am using the query:
{
"requests": [
{
"entityTypes": [
"listItem"
],
"query": {
"queryString": "a contentclass:STS_ListItem_DocumentLibrary"
},
"fields": [
"id",
"name",
"contentclass",
"title"
]
}
]
}
My understanding is that this query will get me all list items that contain the keyword "issue" and have the content class as STS_ListItem_DocumentLibrary. But in my results I am getting results from STS_ListItem_MySiteDocumentLibrary and STS_ListItem_GenericList.
My search endpoint is:
https://graph.microsoft.com/v1.0/search/query
version is: 1.0