Commands › SharePoint Online

Start-SPOAuditDataCollectionForActivityInsights

SharePoint Online Microsoft.Online.SharePoint.PowerShell Start-*

This cmdlet starts collecting audit data for reports on activities from the last 28 days, such as sharing link reports and content shared with everyone except external users, from the SharePoint admin center.

Quick start script

# Start-SPOAuditDataCollectionForActivityInsights — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-SPOService -Url https://$org-admin.sharepoint.com

# 2. Run and inspect
Start-SPOAuditDataCollectionForActivityInsights -ReportEntity <OptInReportEntityEnum> | Format-List

# 3. Export for evidence / drift tracking
Start-SPOAuditDataCollectionForActivityInsights | Export-Clixml .\SPOAuditDataCollectionForActivityInsights-$(Get-Date -Format yyyyMMdd).xml

Syntax

Start-SPOAuditDataCollectionForActivityInsights -ReportEntity <OptInReportEntityEnum> [<CommonParameters>]

Parameters (1)

ParameterTypeRequiredWhat it controls
-ReportEntity OptInReportEntityEnum yes Specifies the entity for which the corresponding audit data should be collected.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.