Can the Graph API delete a person’s One Drive?

Burns, Rusty 20 Reputation points
2024-07-23T20:15:37.44+00:00
  1. Can the Graph API delete a person’s One Drive? Is it possible to automate the deletion of a person’s one drive?
  2. If so, is the One Drive (essentially the personal site) kept in the recycle bin process, just like a deleted document?
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,282 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,833 questions
OneDrive Management
OneDrive Management
OneDrive: A Microsoft file hosting and synchronization service.Management: The act or process of organizing, handling, directing or controlling something.
1,279 questions
0 comments No comments
{count} votes

Accepted answer
  1. Azar 22,870 Reputation points MVP
    2024-07-23T20:19:37.56+00:00

    Hi there Burns, Rusty

    Thanks for using QandA platform

    Yes, the ggraph API can delete a user's OneDrive. You can automate the deletion of a user's OneDrive .

    Use the Graph API endpoint to delete the user's drive:

    DELETE /users/{user-id}/drive while you delete a user's OneDrive, it is moved to the recycle bin, similar to a deleted document.

    tis is how you delete.

    DELETE https://graph.microsoft.com/v1.0/users/{user-id}/drive
    Authorization: Bearer {access-token}
    

    Microsoft Graph API documentation.]

    If this helps kindly acceot the answer thanks much,


0 additional answers

Sort by: Most helpful

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.