Forum Discussion
Andrew Morgan
Apr 08, 2026Copper Contributor
Microsoft Graph - copilot/search how to get nextLink
Hi, I'm having issues getting all the result back from from the search. I'm using "Graph Explorer" to try out /beta/copilot/search, using the request:
{
"query": "test",
"pageSize": 10,
"dataSources": {
"oneDrive": {
"resourceMetadataNames": [
"title",
"author"
]
}
}
}I'm getting the response:
{
"searchHits": [
{
"webUrl": "https://xxx.sharepoint.com/sites/xxxx/Documents/AM%20Test.docx",
"resourceType": "listItem",
"preview": "This is a Template Document This field, AM <c0>Test</c0>,comes from a workflow",
"resourceMetadata": {
"title": "AM Test",
"author": "Andrew Morgan"
}
},
{
"webUrl": "https://xxx.sharepoint.com/sites/xxxx/Documents/Test%20project.docx",
"resourceType": "listItem",
"preview": "This is a Template Document. This field, Test project,comes from a workflow",
"resourceMetadata": {
"title": "Test project",
"author": "Andrew Morgan"
}
},
{
"webUrl": "https://xxx.sharepoint.com/sites/xxxx/Documents/Presentation%20File.pptx",
"resourceType": "listItem",
"preview": "This is a test",
"resourceMetadata": {
"title": "Presentation File.pptx",
"author": "Andrew Morgan"
}
},
{
"webUrl": "https://xxx.sharepoint.com/sites/xxxx/Documents/Test%20project.xlsx",
"resourceType": "listItem",
"preview": "Input Key notes",
"resourceMetadata": {
"title": "Test project",
"author": "Andrew Morgan"
}
},
{
"webUrl": "https://xxx.sharepoint.com/sites/xxxx/Documents/Test%202.docx",
"resourceType": "listItem",
"preview": "Hello Everyone,\r\nWelcome to …......\r\n",
"resourceMetadata": {
"title": "Test 2",
"author": "Andrew Morgan"
}
}
],
"totalCount": 1668
}
What I dont understand is the totalcount is 1668. Buit it doesnt seem to make any difference what I set pageSize to in the request I only ever get back 5 results and also I was expecting "@odata.nextLink" to get the next page of results.
Can anyone shed any light on what i'm doing wrong or is it that i'm not understanding the document here:
https://learn.microsoft.com/en-us/microsoft-365/copilot/extensibility/api/ai-services/search/copilotroot-search
Thanks in advance!
No RepliesBe the first to reply