Microsoft Graph API provides a lot of features and functionalities to access any data from Microsoft 365. In the Office 365 Admin page, we can get the storage information for the user by clicking on the User and Click OneDrive tab.
We can use the Graph API to find out the storage used by the current user and for the other users based on their ID. The below steps help to find that out from MS Graph Explorer,
  • The user should consent with any of the below permissions,

    • Files.Read, Files.Read.All, Sites.Read.All, User.Read, User.ReadWrite, User.Read.All, User.ReadWrite.All, Sites.ReadWrite.All, Directory.Read.All, Directory.AccessAsUser.All, Directory.ReadWrite.All, Files.ReadWrite, File.ReadWrite.All
  • Click Run Query button to get the below Response
We can get the storage information like Total Storage, Used Storage, Remaining Storage and storage used for deleted files.
  1. {
  2. "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#drives(quota)/$entity",
  3. "quota": {
  4. "deleted": 627194,
  5. "remaining": 1098580765401,
  6. "state": "normal",
  7. "total": 1099511627776,
  8. "used": 904277411
  9. }
  10. }
Using the same API for all users is helpful in identifying the quota used by each user across the tenants.