Graph API permanentDelete sends files to the SharePoint recycle bin

Fernando J. Belizón 20 Reputation points
2025-02-04T13:46:55.25+00:00

Good afternoon.

We have a problem deleting files from SharePoint using Graph API.

The context is a document management application that externally handles files located on SharePoint sites. This application uses the endpoint ‘POST /drives/{drive-id}/items/{item-id}/permanentDelete’ to delete files from SharePoint without sending them to the first or second level recycle bin.

The problem is that we have detected that in massive executions (around 300K permanent delete requests) there are some cases (around 20 files) where files deleted with ‘POST /drives/{drive-id}/items/{item-id}/permanentDelete’ are sent to the SharePoint recycle bin (first or second level).

How is this possible? What is the internal operability of the endpoint?

Thanks in advance, Fernando

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,948 questions
{count} votes

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.