Commands › SharePoint Online

Get-SPOTenantLogEntry

SharePoint Online Microsoft.Online.SharePoint.PowerShell Get-*

Retrieves SharePoint Online company logs. This cmdlet is reserved for internal Microsoft use.

Quick start script

# Get-SPOTenantLogEntry — 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
Get-SPOTenantLogEntry -CorrelationId <Guid> -Source <Int32> -User <String> | Format-List

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

Syntax — 4 parameter sets

SiteSubscriptionId (Default)

Get-SPOTenantLogEntry [[-StartTimeInUtc] <DateTime>] [[-EndTimeInUtc] <DateTime>] [[-MaxRows] <UInt32>]
 [<CommonParameters>]

CorrelationId

Get-SPOTenantLogEntry -CorrelationId <Guid> [[-StartTimeInUtc] <DateTime>] [[-EndTimeInUtc] <DateTime>]
 [[-MaxRows] <UInt32>] [<CommonParameters>]

Source

Get-SPOTenantLogEntry -Source <Int32> [[-StartTimeInUtc] <DateTime>] [[-EndTimeInUtc] <DateTime>]
 [[-MaxRows] <UInt32>] [<CommonParameters>]

User

Get-SPOTenantLogEntry -User <String> [[-StartTimeInUtc] <DateTime>] [[-EndTimeInUtc] <DateTime>]
 [[-MaxRows] <UInt32>] [<CommonParameters>]

Parameters (6)

ParameterTypeRequiredWhat it controls
-CorrelationId Guid yes Specifies the Correlation ID as a filter.
-EndTimeInUtc DateTime Specifies the end time in UTC to search for logs.
-MaxRows UInt32 Specifies the maximum number of rows in the descending order of timestamp. The value must be less than 5000. The default value is 1000.
-Source Int32 yes Specifies the component that logs the errors.
-StartTimeInUtc DateTime Specifies the start time in Coordinated Universal Time (UTC) to search for the logs (for example, 01032011:12:00).
-User String yes Specifies the log-on identity as a filter.

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