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 365 and Office | SharePoint | For business | Windows
Microsoft 365 and Office | OneDrive | For business | Windows
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Accepted answer
  1. Azar 29,520 Reputation points MVP Volunteer Moderator
    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.