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.
At a glance
Section titled “At a glance”| Where in the app | SharePoint Online › Sharing & Governance › Orphaned OneDrives |
| Workload | OneDrive |
| Kind | Table · dashboard tile |
| Data | Read 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. |
| Licence | SharePoint Online (OneDrive). |
| Report id (API and MCP) | sharepoint.governance.orphaned-onedrives |
Columns
Section titled “Columns”| Column | Key | Type |
|---|---|---|
| Owner | Owner | Text |
| Name | DisplayName | Link |
| Owner state | OwnerState | Status |
| Owner deleted | OwnerDeleted | Date |
| OneDrive deleted after | DeletionDue | Date |
| Days left | DaysLeft | Text |
| Storage (GB) | StorageUsedGb | Text |
| Last content change | LastContentModified | Date |
| Lock | LockState | Text |
What it needs
Section titled “What it needs”Licence: SharePoint Online (OneDrive).
Application permissions on the IntensiveReports app registration (all permissions):
| Permission | API | What it allows | Note |
|---|---|---|---|
Sites.FullControl.All | Office 365 SharePoint Online | Have full control of all site collections | application, certificate |
User.Read.All | Microsoft Graph | Read all users’ full profiles | |
User-LifeCycleInfo.Read.All | Microsoft Graph | Read all users’ lifecycle information |
Data sources it reads
Get-PnPTenant (OrphanedPersonalSitesRetentionPeriod)Get-PnPTenantSite -IncludeOneDriveSitesGET /v1.0/usersGET /v1.0/directory/deletedItems/microsoft.graph.user
Through the API and MCP
Section titled “Through the API and MCP”GET /ir-api/v1/reports/sharepoint.governance.orphaned-onedrives?size=100An 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.