Code: itemNotFound Message: The resource could not be found.

AB 1 Reputation point

According to the documentation

Retrieve the metadata for a driveItem in a drive by file system path or ID. item-id is the ID of a driveItem. It may also be the unique ID of a SharePoint list item.

Using the following request


    "@odata.context": "$metadata#users('bdab55ad-2ff1-44f3-adb2-bded7f47379a')/drive/items/$entity",  
    "@odata.etag": "\"{DA689F16-106F-46F1-8100-8E049D687576},6\"",  
    "sharepointIds": {  
        "listId": "15e4036c-1f5c-4e28-a59d-c702407a5ba4",  
        "listItemId": "4",  
        "listItemUniqueId": "da689f16-106f-46f1-8100-8e049d687576",  
        "siteId": "92f9d935-71bc-4eab-868b-32dfbc1a460c",  
        "siteUrl": "REMOVED",  
        "tenantId": "ff732f75-0680-43aa-be16-a97c2520f0c4",  
        "webId": "3b556987-0954-417d-829f-76ab02dd1d2f"  

Based on the documentation I should be able to make the same request using the "listItemUniqueId"?



    "error": {  
        "code": "itemNotFound",  
        "message": "The resource could not be found.",  
        "innerError": {  
            "date": "2022-08-12T14:29:13",  
            "request-id": "fdf19ff6-96d2-44b7-8bde-ad269dd74301",  
            "client-request-id": "882ce395-df9d-56c6-31d7-7684fb6b27e2"  

The above requests were made using the

I've also tried both with an application and still the same results. Has there been any changes?

If this is a backend issue, should it be returning itemNotFound, I don't think you should be retrying on this.

In the above example, this is for OneDrive, but have seen it SharePoint Sites as well


Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,524 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. HarmeetSingh7172 4,811 Reputation points

    Hi @AB

    Hope you're doing well.

    As per my research and understanding, you can't use listItemUniqueId as an item-id in{item-id}/ endpoint.
    However, you can always pass a item-id of an item present in SharePoint List (in above endpoint). Please note that Items in a SharePoint document library can be represented as a listItem or driveItem resource.

    For listing the items of a drive, use this endpoint-
    For listing the children of a driveItem, say a folder-{item-id}/children
    Furthermore, you can replace item-id of folder in above endpoint by item-id of a residing file using Graph API response.

    Hope this helps.
    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.

    0 comments No comments

  2. AB 1 Reputation point

    Hi @HarmeetSingh7172
    Thanks for getting back to me. Unless I've missed something the documentation has this

    This was working previously around 8 weeks ago off the top of my head, I made changes in our application to use this id and it worked fine.

    0 comments No comments