Cannot find some documents (uploaded 3days ago) through Graph Api, returns "itemNotFound"

Jim Li 0 Reputation points
2023-11-20T03:13:22.2833333+00:00

I need to get a file from a very deep folder in a rather large Document Library (713667 items) by Graph Api. This site was migrated from SharePoint 2016 several days ago.

I try to get the file using this api

GET https://graph.microsoft.com/v1.0/sites/{{SiteID}}/drive/root:/{{ItemPath}}?$select=id

but always return "itemNotFound" error.

However, this only happens in some folders, and documents in other folders can be found normally.

The internet says that Graph Api relies on SharePoint search to retrieve it, and then the file I found to be unfindable really couldn't be found in the search bar for the last couple of days after I first uploaded it, but today I found that it is now searchable in SharePoint Online, but still not findable via Graph Api!

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,041 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Diah.Karim-MSFT 330 Reputation points Microsoft Vendor
    2023-12-11T23:31:04.6566667+00:00

    This thread can be closed due to some incorrect mapping to document folder.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.