Firstly, I using sdk 4.x version.
I want to create search function from onedrive with graph api.
In the Teams(app) search function case, when I use search function, the apps return info with file’s contents and show stress searching keyword.
I want to show that file’s contents(Not full text, only including search keyword)
But, the search response are’t including content.
So, How can I replace this function? Or Do I wrong use this api?
That is a my search request code.
var searchResults = await graphServiceClient
.Drives[driveId2]
.Root
.Search(searchQuery)
.Request()
.GetAsync();
In graph explorer case(Http request)
https://graph.microsoft.com/v1.0/me/drives/b!SoVLl_cMV0m-LhNDYBjj_A-mBCIl-3dEoicDMVnEfVABgoGg2gexQ7frRHmqg2GK/root/search(q='')
And also, content request case to reponse including ReadTimeout and WriteTimeout
var searchResults = await graphServiceClient
.Drives[driveId]
.Items[fileId]
.Content
.Request()
.GetAsync();
New contributor