I am reading graph-explorer below. https://developer.microsoft.com/en-us/graph/graph-explorer
However, I don't know which api can access all staff one drive.
I am reading graph-explorer below. https://developer.microsoft.com/en-us/graph/graph-explorer
However, I don't know which api can access all staff one drive.
When you say all staff OneDrive, do you mean all files in a users one drive or one drives for all users in the tenant?
You can start with MS Graph Files API which allows you to list the files and delete them. The files APIs give you access to the one drive as per the permissions granted by the signed in user.
Note that on Graph Explorer you can only do this for the current signed in user. To do this for all users in our tenant which is what I understand you mean by all staff, you need to use application permissions. Checkout Quickstart: Get a token and call the Microsoft Graph API by using a console app's identity.
2 people are following this question.