How to Export Microsoft Sentinel Logs for Investigation

· Original article ↗

Summary

A guide to querying Sentinel data with KQL and exporting results as JSON or JSONL using Azure CLI or PowerShell, with notes on permissions, retention, and query limits. It also describes uploading the files to LogTotal at logtotal[.]com.

Key points

  • The article recommends Azure CLI or PowerShell to export Sentinel query results as JSON or JSONL; the portal’s spreadsheet-style export is described as incompatible with LogTotal.
  • It provides KQL examples for Linux SSH activity in Syslog and Windows events in SecurityEvent.
  • Log Analytics Reader or Microsoft Sentinel Reader permissions and the workspace GUID are needed for the described queries.
  • Interactive-retention data can be queried directly; long-term-retention data requires a search job or restore first.
  • For busy tables, split the query time window into smaller slices because result rows and size are capped.

Article Details

Defense Focus
Export and review Microsoft Sentinel log data for investigations.
Detection Methods
  • Use KQL filters on Syslog to review Linux SSH activity by time range, computer, and process name.
  • Use KQL filters on SecurityEvent to review Windows logons and account changes on a domain controller.
Data Sources
  • SecurityEvent
  • Syslog
  • SigninLogs
  • AuditLogs
  • OfficeActivity
  • CommonSecurityLog
  • AzureActivity
  • Custom _CL tables
  • Defender data queried alongside Sentinel tables through advanced hunting
Rule Types
  • KQL queries
Platforms
  • Microsoft Sentinel
  • Log Analytics
  • Azure portal
  • Microsoft Defender portal
  • LogTotal
Defensive Actions
  • Query the workspace and verify the result row count in the portal before exporting.
  • Export query results as JSON or JSONL using Azure CLI or PowerShell.
  • For busy tables or result limits, split the time window into smaller slices and run separate exports.
  • For data in long-term retention, run a search job or restore the data before querying.
  • Upload the JSONL file to LogTotal, then sanitize and review it.

Vendors

Products

Related Articles