Getting the contents of the recycle bin from msgraph fails

Rémi Picot 10 Reputation points
2025-02-21T10:04:39.8133333+00:00

Hello there, I'm trying to use msGraph to get the content of a recycle bin

I'm using a request like this using app permissions

https://learn.microsoft.com/en-us/graph/api/filestoragecontainer-list-recyclebinitem?view=graph-rest-1.0

so this request :

GET /storage/fileStorage/containers/{containerId}/recycleBin/items

On the {containerId} I put my driveId

I tried directly with a curl like request and with the latest version of the official java connector to msgraph.

Do anyone manages to make it work ?

Microsoft Security | Microsoft Graph
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Carolyne-3676 381 Reputation points
    2025-02-25T13:52:08.58+00:00

    Thank you for reaching out. Kindly check on the permissions. In addition to the MS Graph Permissions you need to ensure you have the necessary container-type level permission or permissions to call this API as indicated in the documentation you have linked. You must provide a valid containerID in this call for it to be successful. I would advise that you first follow this documentation to see the items that are visible to you as the caller-List containers - Microsoft Graph v1.0 | Microsoft Learn It would also be helpful if you pasted the details of the error you are encountering if available.


  2. Rémi Picot 10 Reputation points
    2025-03-07T02:47:33.6666667+00:00

    Just in case I'm still looking for answer, as far as I can't tell for now it's not possible to get the recycle bin's content

    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.