In large organizations, every employee has a personal OneDrive for Business account. Some accounts are approaching storage limits, some are inactive, and a few consume more storage than expected. Without proper monitoring, this can lead to inefficiencies, increased costs for storage, and compliance risks. So, it is essential to monitor storage consumption of users in OneDrive to proactively manage resources and optimize the user experience across your organization. Let’s explore what are the ways to export OneDrive usage report for Microsoft 365 users.
How to Export OneDrive Usage Report for Users in Microsoft 365?
Below are the methods available to retrieve OneDrive storage consumption of users in Microsoft 365.
- Get OneDrive storage consumption using Microsoft 365 admin center
- Track users’ OneDrive storage space using MS Graph PowerShell
- Export OneDrive usage report for users using PowerShell script
1. Check OneDrive Storage Consumption in Microsoft 365 Admin Center
You can easily determine how much storage a user is consuming in their OneDrive by following these steps:
- Sign in to Microsoft 365 admin center.
- Navigate to Users > Active users.
- Select the user whose OneDrive usage you want to check.
- Go to the OneDrive tab.
- Look for the Storage used section to see the consumption.
If you want to check storage usage for all users at once, you can use OneDrive for Business storage quota report in Microsoft 365 admin center.
- Sign in to the Microsoft 365 admin center.
- Go to Reports > Usage.
- Select OneDrive to see the amount of storage used by each user.
- Click Export to download the OneDrive usage report as a CSV file.
Note: One drawback of this report is that the data may take up to 48 hours to reflect.
2. Track Users’ OneDrive Storage Space Using MS Graph PowerShell
Microsoft Graph PowerShell offers a modern and unified way to access usage data across Microsoft 365 services. Run the Get-MgReportOneDriveUsageAccountDetail cmdlet to track individual users’ OneDrive storage space, activity, and adoption patterns.
1 |
Get-MgReportOneDriveUsageAccountDetail -Period "<period>" -OutFile "<FilePath>" |
However, it’s important to note that Get-MgReportOneDriveUsageAccountDetail cmdlet will not display OneDrive site URLs.
3. Export OneDrive Usage Report for Users Using PowerShell Script
To address the limitations of Get-MgReportOneDriveUsageAccountDetail cmdlet and built-in reports, we have developed a PowerShell script. It extracts detailed storage usage information and helps administrators monitor storage utilization across all OneDrive sites without data gaps.
Download Script: OneDriveUsageReport.ps1
Script Highlights:
- The script allows you to export OneDrive usage report for all OneDrive sites.
- The script uses SharePoint Online Management Shell module and installs it if not already present (with user confirmation).
- Exports the report result to CSV.
Sample Output:
The script help admins export OneDrive storage consumption for all users with the following attributes:
- Owner UPN
- OneDrive Url
- Storage Used (GB)
- Storage Quota (GB)
- Storage Used (MB)
- Storage Quota (MB)
- Status
- Archive Status
- Last Content Modified Date
To run the script, do the following:
1 |
.\OneDriveUsageReport.ps1 |
This format prompts you to enter tenant name and retrieves OneDrive for Business usage data. By analyzing this report, you can identify users who are approaching or exceeding their storage limits and take action to adjust OneDrive storage capacity as needed.
Alternatively, you can run the script by specifying parameters and replacing them with your organization’s name, user ID, and password.
1 |
.\OneDriveUsageReport.ps1 -HostName "Contoso” -UserName <username> -Password "<password>" |
The exported OneDrive usage report will look like the screenshot below:
I hope this blog helped you export OneDrive usage report over time. Feel free to reach us through the comments section, if you have any queries.