Skip to content

Inactive SharePoint Users (90 days)

The question it answers: Which users have not accessed a SharePoint file or site in the last 90 days?

Where in the appSharePoint Online › Sites › Inactive Users
WorkloadSharePoint Online
KindTable
DataA scan: it runs only when someone presses Run scan (or calls the API’s scan action) and can take minutes. The last result is kept until the next scan.
LicenceMicrosoft Purview Audit (Standard) - included in Microsoft 365 E3 / Business Premium; unified audit logging must be on.
Report id (API and MCP)sharepoint.users.inactive
ColumnKeyType
Last activityLastActivityFormattedText
UserIdText

Licence: Microsoft Purview Audit (Standard) - included in Microsoft 365 E3 / Business Premium; unified audit logging must be on.

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

PermissionAPIWhat it allowsNote
User.Read.AllMicrosoft GraphRead all users’ full profiles
AuditLogsQuery.Read.AllMicrosoft GraphRead audit logs data from all services
Data sources it reads
  • GET /v1.0/users (all pages)
  • POST /v1.0/security/auditLog/queries (FileAccessed, SiteAccessed, last 90 days)
  • GET /v1.0/security/auditLog/queries/{id}
  • GET /v1.0/security/auditLog/queries/{id}/records
GET /ir-api/v1/reports/sharepoint.users.inactive?size=100
POST /ir-api/v1/reports/sharepoint.users.inactive/scan

An AI assistant reads it with the MCP tool get_report and the id sharepoint.users.inactive. The client needs the Run scan grant for SharePoint Online. See Using the API.