API to get deleted drive items in Onedrive

Aman Singh 26 Reputation points


I am trying to get my deleted files and folders in onedrive using API.
But I couldn't find anything appropriate.

Is there any endpoint available for this task OR any other possible way.


Microsoft Graph Files API
Microsoft Graph Files API
A Microsoft API to create an app that connects with files across OneDrive, OneDrive for Business, and SharePoint document libraries.
390 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,242 questions
{count} votes

Accepted answer
  1. Shivam Dhiman 5,786 Reputation points

    Hi @Aman Singh

    Use the includeDeletedItems=true query parameter to return deleted items. This query parameter is only valid when targeting a driveItem by ID, and otherwise will be ignored.

    GET /me/drive/items/{item-id}  

    This is currently only supported on OneDrive Personal.
    source: driveitem-get

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

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful