Skip to content

Orphaned OneDrives of Leavers

The question it answers: Which OneDrives belong to disabled or deleted users, and how many days are left before a deleted owner’s OneDrive is gone?

When a user is deleted, their OneDrive is kept for the retention period (30 days by default) and then deleted - including files nobody else has a copy of. Disabled accounts whose OneDrive is still full, and deleted ones about to run out of retention, are listed so someone can move what the business still needs.

Where in the appSharePoint Online › Sharing & Governance › Orphaned OneDrives
WorkloadOneDrive
KindTable · dashboard tile
DataRead from Microsoft 365 when someone first opens it, then kept for the report cache lifetime (Settings > Data & cache, 1 hour unless changed). It reads through PowerShell (Exchange Online or SharePoint Online), so the first load takes longer than a Graph report.
LicenceSharePoint Online (OneDrive).
Report id (API and MCP)sharepoint.governance.orphaned-onedrives
ColumnKeyType
OwnerOwnerText
NameDisplayNameLink
Owner stateOwnerStateStatus
Owner deletedOwnerDeletedDate
OneDrive deleted afterDeletionDueDate
Days leftDaysLeftText
Storage (GB)StorageUsedGbText
Last content changeLastContentModifiedDate
LockLockStateText

Licence: SharePoint Online (OneDrive).

Application permissions on the IntensiveReports app registration (all permissions):

PermissionAPIWhat it allowsNote
Sites.FullControl.AllOffice 365 SharePoint OnlineHave full control of all site collectionsapplication, certificate
User.Read.AllMicrosoft GraphRead all users’ full profiles
User-LifeCycleInfo.Read.AllMicrosoft GraphRead all users’ lifecycle information
Data sources it reads
  • Get-PnPTenant (OrphanedPersonalSitesRetentionPeriod)
  • Get-PnPTenantSite -IncludeOneDriveSites
  • GET /v1.0/users
  • GET /v1.0/directory/deletedItems/microsoft.graph.user
GET /ir-api/v1/reports/sharepoint.governance.orphaned-onedrives?size=100

An AI assistant reads it with the MCP tool get_report and the id sharepoint.governance.orphaned-onedrives. The client needs the Read grant for OneDrive. See Using the API.