graph api list items - deletion permanently

Pfeiffer Andreas - UCI 245 Reputation points
2024-11-08T15:56:08.0733333+00:00

Hi,

When using this endpoint DELETE /sites/{site-id}/lists/{list-id}/items/{item-id} , documentation is here: https://learn.microsoft.com/en-us/graph/api/listitem-delete?view=graph-rest-1.0&tabs=http

I discover that the deleted items are in the recycle bin. Is there a way to delete these items permanently so that they are not shown in the recycle bin ?

Thank you

Andreas

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,361 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.
3,484 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 116K Reputation points MVP
    2024-11-09T14:10:25.9+00:00

    There is no hard delete method for list items. You might be able to use the hard delete operation on a driveItem instead, depending on your scenario: https://learn.microsoft.com/en-us/graph/api/driveitem-permanentdelete?view=graph-rest-1.0


1 additional answer

Sort by: Most helpful
  1. AllenXu-MSFT 24,596 Reputation points Microsoft External Staff
    2024-11-11T01:34:58.09+00:00

    Hi @Pfeiffer Andreas - UCI,

    When you delete items using the Graph API, they are initially moved to the Recycle Bin and are not permanently deleted right away. I'm afraid currently it is impossible to delete items permanently.

    With REST Api, we can permanently delete SharePoint list items. See this guide please: Permanently delete SharePoint list items using Power Automate (skip the Recycle Bin).


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

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    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.