How to get data for single item in recycleBin for Sharepoint using Msft Graph API

User3 40 Reputation points
2024-05-21T07:15:30.1966667+00:00

I am using Microsoft Graph API to access details about files in Sharepoint.

I can get the list of deleted items using -

https://graph.microsoft.com/beta/sites/{siteId}/recycleBin/items/

But when I try to retrieve data about a single item using
https://graph.microsoft.com/beta/sites/{siteId}/recycleBin/items/{itemId}

I get an error -

"code": "itemNotFound",

"message": "Item not found",

I am using the same item id which I can see in the list so not sure what is going wrong.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,044 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,005 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yakun Huang-MSFT 1,320 Reputation points Microsoft Vendor
    2024-05-21T08:21:25.13+00:00

    Hi @User3

    This is the bate version, the 1.0 version endpoint is not yet released, and the current beta version does not yet support querying specific items from the recycle bin, only listing all items from the recycle bin.

    By the way, we do not recommend using this endpoint in production, as it may be subject to change at any time.

    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.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful