ListItemDriveItemContent is not working anymore

Loic DA SILVA (Cloud Admin) 20 Reputation points

Hello, I am using the Graph API to download one a week a SharePoint file. This was working since a year but suddently I now have an error. The endpoint I use is:{{SideId}}/lists/{{ListId}}/items/{{ItemId}}/driveItem/content Now it returns me a 404 with the following response body:

  "error": {
    "code": "itemNotFound",
    "message": "Item not found"
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
9,939 questions
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 34,621 Reputation points

    Hi @Loic DA SILVA (Cloud Admin)

    You should download drive items instead of list items, please change your API endpoint to the following:

    GET /sites/{siteId}/drive/items/{item-id}/content

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

0 additional answers

Sort by: Most helpful