An API that connects multiple Microsoft services, enabling data access and automation across platforms
OneDrive Personal DriveItem Search produces error 500 when skiptoken is used - How can I fix this?
I am having problems with the Microsoft Graph API when searching a large number of DriveItems in OneDrive Personal. I have over 10000 files that match the search condition, and when I use the Server-Side Paging to GET the full list of matching files, I am getting error 500 when I use the skiptoken query parameter as follows: https://graph.microsoft.com/v1.0/me/drive/root/search(q='xxxxx')?$select=name%2cid%2cwebUrl&$skiptoken=MjAx
The error is reproducable in Graph Explorer. I have tried reducing the page size using $top, but it does not change anything. The max page size is 2000, and when there are more than 2000 matching files I get the error.
This the result of the initial API call to select the first page:
Graph DriveItem Pagination API Error #1.jpg
This is the error when I click on the @odata.nextLink property containing skiptoken=MjAx to select the second page:
Graph DriveItem Pagination API Error #2.jpg
The error is:
{
"error": {
"code": "generalException",
"message": "Error Calling Substrate Search",
"innerError": {
"date": "2026-01-06T04:56:02",
"request-id": "9c00b13a-9909-47d8-a1e6-ea25f5cf4d51",
"client-request-id": "c9ff56fe-82de-5fa5-4d38-4f8d8187bd9b"
}
}
}
Moved from Microsoft 365 and Office | OneDrive | For home | Windows