To export OneDrive storage usage in Microsoft 365, download the OneDrive usage report with Get-MgReportOneDriveUsageAccountDetail and write it to CSV. The report lists only people with a valid OneDrive licence, runs behind current use, and names no owners if your tenant conceals names in usage reports.
| Method | Best fit |
|---|---|
| PowerShell | A CSV of every OneDrive's storage used and limit in gigabytes, largest first. |
| Admin centre | A look at Microsoft's usage report, or a one-off CSV of storage, files and last activity. |
| Altivane | Recommended for regular storage reviews, with use against each limit and a workbook to keep. |
Before you start
Use an account that can view usage reports, such as Reports Reader or SharePoint Administrator. Usage Summary Reports Reader sees no user details. The PowerShell example requests Reports.; your organisation may require administrator consent.
Know what the report covers. It includes only users who have a valid OneDrive licence, and it is not live: Microsoft says usage reports typically become available within 24 to 72 hours and can take several days. The examples read and export; they change no OneDrive, account or setting.
Option 1
Export OneDrive storage usage with PowerShell
Install the modules once, then connect and download the report. It arrives as a CSV file, so the script reads it, converts bytes to gigabytes and exports it largest first.
# Install once, if the modules are not already installed.
Install-Module Microsoft.Graph.Authentication, Microsoft.Graph.Reports -Scope CurrentUser$ErrorActionPreference = 'Stop'
Connect-MgGraph -Scopes 'Reports.Read.All' -NoWelcome
try {
$download = Join-Path $PWD 'onedrive-usage-download.csv'
Get-MgReportOneDriveUsageAccountDetail -Period D30 -OutFile $download
$accounts = @(Import-Csv -Path $download)
Remove-Item -Path $download
if ($accounts.Count -eq 0) {
Write-Output 'The usage report returned no OneDrive accounts.'
} else {
$bytesPerGB = 1073741824
$report = @(foreach ($account in $accounts) {
$used = [double]$account.'Storage Used (Byte)'
$limit = [double]$account.'Storage Allocated (Byte)'
$percent = if ($limit -gt 0) { [math]::Round(100 * $used / $limit, 1) } else { $null }
[pscustomobject]@{
Owner = $account.'Owner Display Name'
Account = $account.'Owner Principal Name'
StorageGB = [math]::Round($used / $bytesPerGB, 2)
LimitGB = [math]::Round($limit / $bytesPerGB, 2)
UsedPercent = $percent
Files = [int64]$account.'File Count'
ActiveFiles = [int64]$account.'Active File Count'
LastActivity = $account.'Last Activity Date'
Deleted = $account.'Is Deleted'
ReportRefreshed = $account.'Report Refresh Date'
}
})
$report | Sort-Object StorageGB -Descending |
Export-Csv -Path './onedrive-storage.csv' -NoTypeInformation -Encoding utf8
Write-Output "$($report.Count) OneDrive accounts exported."
}
} finally {
Disconnect-MgGraph | Out-Null
}The CSV has 1 row for each OneDrive. -Period D30 sets the window for the active file count; D7, D90 and D180 also work. Deleted accounts stay in the report with True under Deleted. Another way is Get-SPOSite -IncludePersonalSite $true in the SharePoint Online Management Shell, which needs the SharePoint Administrator role and site collection administrator rights.
Check a single account
The report has no per-person filter, so read 1 account from the CSV.
# Reads the CSV the export wrote. Replace the example account.
Import-Csv -Path './onedrive-storage.csv' |
Where-Object { $_.Account -eq 'person@example.com' } |
Select-Object Owner,Account,StorageGB,LimitGB,UsedPercent,LastActivityOption 2
Export the OneDrive usage report from the admin centre
- Open the Microsoft 365 admin centre for the correct tenant.
- Go to Reports > Usage. If Reports is missing, select Show all first.
- Under Reports, select OneDrive, then the Usage tab.
- Select Choose columns to add or remove columns from the table.
- Select Export to download the usage data of all users as a CSV file.
This suits a quick look or a one-off file. It does not suit a regular review: the table shows storage used in MB, with no rating against each limit.
Option 3 ยท Recommended for regular storage reviews
Run Altivane's OneDrive Accounts report
- Open Altivane and choose the tenant.
- Run the OneDrive Accounts report for SharePoint.
- Open the Excel workbook the run wrote and read its rows: Owner, Account, Url, Created, Last used, Days unused, Storage (GB), Limit (GB), Used (%), Files and Active files.
Altivane reads the same usage report for the last 30 days and matches it to the tenant's OneDrives. It works out each OneDrive's share of its limit and its days since last use, which the other 2 methods leave to you. With the admin tier (Sites. on the SharePoint API), the table also has Sharing and Lock state columns. The OneDrive scorecard report adds tables of OneDrives near their limit and not used recently, using the Storage warning and Inactive sites settings.
Common questions
Why do the owner columns not name anyone?
Microsoft hides user, group and site names in usage reports by default, and the setting applies to Microsoft Graph too. A Global Administrator can turn it off in the Microsoft 365 admin centre: Settings > Org settings, the Services tab, Reports, then clear Conceal user, group, and site names in all reports. Microsoft logs showing names in the Microsoft Purview audit log, so check your privacy rules first. Altivane cannot match a concealed report to OneDrives, so it leaves last use and file counts blank.
Why is a person missing, or a deleted person still listed?
The report includes only users with a valid OneDrive licence, so an account without one is absent. Microsoft says it takes at least 7 days for a deleted account to be marked as deleted, and that deleted users continue to appear in reports for 180 days.
Does the export show who a OneDrive is shared with?
No. The usage report covers storage, files and activity. With the admin tier, Altivane's table adds Sharing and Lock state columns. For the tenant's own settings, see how to check external sharing settings in SharePoint Online.
Microsoft references
Technical references checked on 5 October 2026. The example scripts have been reviewed and syntax checked; they have not been run against a live tenant.