Domain 4 β€” Module 5 of 6 83%
27 of 28 overall
Domain 4: Manage and monitor security posture Free ⏱ ~11 min read

Sentinel Automation: Rules, Playbooks, Retention, Purview Audit in Defender XDR

Microsoft Sentinel automation rules and playbooks for SOC response, data retention across Analytics / Auxiliary / Data Lake tiers, and querying Microsoft Purview Audit via the Defender XDR Advanced Hunting surface.

Automation, retention, audit β€” the SOC operational stack

Simple explanation

Three SC-500 operational topics that complete the Sentinel story:

  • Automation rules β€” declarative rules that react to incidents (and alerts) β€” change owner, assign to a tier, set status, add tags, attach a playbook, suppress duplicates. They’re the lightweight automation layer.
  • Playbooks β€” Logic Apps that perform multi-step response actions: post to Teams, isolate a device via Defender for Endpoint, disable a user in Entra ID, look up a file hash in threat intel, ask a human for approval, then act. Triggered by automation rules or invoked manually.
  • Data retention β€” three tiers (Analytics, Auxiliary, Data Lake) with different cost/queryability trade-offs. Choose per table based on how the data is used.
  • Purview Audit in Defender XDR β€” Microsoft Purview’s Audit log is queryable from the Defender XDR Advanced Hunting surface, letting SOC analysts pivot from a Defender XDR incident into a unified KQL query across audit events without leaving the portal.

Automation rules

Automation rules are Sentinel-native declarative response automation. Three trigger types:

  • When alert is created β€” fires on any analytics rule output (single alert).
  • When incident is created β€” fires when an incident (one or more correlated alerts) appears.
  • When incident is updated β€” fires on incident updates (status change, owner change, tag added, etc.) β€” useful for β€œif SOC closes as false positive, capture the reason in a workbook” workflows.

Conditions match on alert/incident properties (severity, tactic, technique, source product, name patterns). Actions:

  • Change incident properties: assign owner, set status (New / Active / Closed), set severity, add tags
  • Add task β€” assign work items as part of the incident
  • Suppress (only on alert trigger) β€” don’t create incident
  • Run playbook β€” invoke one or more Logic Apps playbooks

Automation rules can be ordered (a sequence of evaluation) and scoped to specific analytics rules (run only for matching analytics rule outputs).

Playbooks (Logic Apps)

Playbooks are Logic Apps that use Microsoft Sentinel triggers and connectors. Standard plan or Consumption plan; Standard is the SOC-recommended for tenant isolation, VNet integration, and predictable performance.

Common playbook patterns:

Common Sentinel playbook patterns
PatternWhat it does
Enrich incidentLook up IPs in threat intel, look up file hashes in VirusTotal, look up users in HR data, post enrichment as incident comments
Notify and assignPost to a Teams channel, email an on-call, page via ntfy/PagerDuty, assign to tier-1 analyst
ContainIsolate a device via Defender for Endpoint, disable a user in Microsoft Entra ID, revoke sign-in sessions, block an IP in Azure Firewall / a CDN
TriageApply rules to auto-close false positives (e.g. expected scanning from approved IP), set severity based on enrichment results
Human-in-the-loopSend a Teams approval card to a manager before performing a destructive action (disable user, isolate device); proceed on approval
Hand off to ITSMCreate a ServiceNow / Jira / Azure DevOps incident with the Sentinel incident details

Playbooks are triggered by automation rules or invoked manually from the incident view by an analyst with the Sentinel Playbook Operator (or Responder/Contributor) role.

Data retention tiers

Sentinel/Log Analytics now offers three retention tiers per table:

Sentinel data retention tiers β€” choose per table
TierBest forQuery modelTypical cost
AnalyticsActive SOC data (last 30–90 days)Interactive KQL, analytics rules, hunting, workbooks, dashboardsHighest per GB
Auxiliary (recent retention)High-volume but lower-priority data (firewall logs, NetFlow, DNS) β€” searched on demandKQL search jobs (jobs, not interactive); limited functions~$0.15/GB ingested (significantly lower than Analytics)
Data Lake (long-term)Compliance retention beyond 730 days, archival of unusable-day-to-day dataSearch jobs or restore to Analytics for interactive queryLowest β€” pure storage cost

Per-table retention is configurable. Standard pattern for SC-500-aligned environments:

  • Analytics tier: SecurityEvent, SigninLogs, AuditLogs, DeviceFileEvents, etc. β€” typically 90 days, with some up to 365 days
  • Auxiliary tier: high-volume firewall, NetFlow, DNS resolution logs β€” kept for search-on-demand for incident investigation
  • Data Lake: anything retained for compliance reasons beyond the Analytics retention max (typically 7+ years for some regulated industries)

Purview Audit in Defender XDR

Microsoft Purview Audit is the unified audit log for Microsoft 365 (Exchange, SharePoint, Teams, etc.) + Microsoft Entra audit events. Two query paths:

  • Microsoft Purview portal β€” Audit Search β€” interactive search UI in the Purview portal
  • Microsoft Defender XDR Advanced Hunting β€” KQL query against CloudAppEvents (and related tables) that include Purview Audit entries

The Defender XDR Advanced Hunting path is the SC-500 surface: SOC analysts working an incident in Defender XDR can pivot directly into KQL queries that join Defender XDR telemetry with Purview Audit entries β€” no portal-switching, one query surface.

Why query Purview Audit from Defender XDR?

When a Defender XDR incident involves an M365 entity β€” a user signed in unusually, then sent a suspicious email, then accessed an external SharePoint site β€” the SOC analyst’s natural question is β€œwhat else did this user do in M365 in this window?”

The Purview Audit log has the answer (every user action in Exchange / SharePoint / Teams is logged). Surfacing it in Defender XDR Advanced Hunting means the analyst writes one KQL query that joins IdentityLogonEvents + EmailEvents + CloudAppEvents and gets the full picture without leaving the portal.

This is the β€œPurview Audit in Defender XDR” SC-500 objective β€” operationally, it’s about reducing analyst context switching.

Scenario: Dom builds the SOC automation for a high-volume client

For Kestrel Cyber Co-op’s fintech client (200 users, 500 incidents/month estimated):

  1. Automation rules:

    • All incidents from the Microsoft Defender XDR source β†’ assign to Kestrel SOC tier-1 queue, set status Active.
    • Incidents with severity Informational from analytics rules tagged noise-tolerated β†’ auto-close as Benign Positive with note.
    • All incidents involving a labelled-sensitive SharePoint site β†’ run Playbook: ContainAndEnrich.
  2. Playbook: ContainAndEnrich:

    • Look up involved IPs in MISP threat intel; post results as incident comments.
    • Look up involved user accounts; post manager + group memberships.
    • If high severity AND any IP is on MISP indicators β†’ Teams approval card to on-call.
    • On approval β†’ disable user via Microsoft Graph + revoke sessions; isolate device via Defender for Endpoint.
  3. Data retention:

    • SecurityEvent, SigninLogs, AuditLogs: Analytics 90 days.
    • Defender XDR Device tables: Analytics 90 days.
    • Firewall logs from CEF: Auxiliary tier β€” searched on incident.
    • Compliance archive: Data Lake for 7 years.
  4. Purview Audit integration: Dom builds a saved hunting query in Defender XDR Advanced Hunting that joins IdentityLogonEvents, EmailEvents, and CloudAppEvents (including Purview Audit) to surface β€œwhat did this user do in M365 in the last 24 hours” β€” used as the standard first hunt on any user-involved incident.

After 30 days: ~60% of incidents auto-triaged or auto-closed; mean time to enrichment drops from 18 min to 3 min; Purview Audit queries cover ~85% of analyst pivots without portal switching.

Key terms

Question

What are Microsoft Sentinel automation rules?

Click or press Enter to reveal answer

Answer

Declarative Sentinel-native response rules triggered by alert created, incident created, or incident updated events. Actions include changing incident properties (assign owner, set status/severity, add tags), suppressing alerts, and running one or more playbooks. Ordered and scopable to specific analytics rules.

Click to flip back

Question

What is the difference between Sentinel automation rules and playbooks?

Click or press Enter to reveal answer

Answer

Automation rules are Sentinel-native declarative response logic β€” match conditions, take simple actions, run playbooks. Playbooks are Logic Apps that perform multi-step workflows β€” enrichment, containment, notification, ITSM integration, human-in-the-loop approvals. Automation rules invoke playbooks; playbooks do the heavy lifting.

Click to flip back

Question

What are the three Sentinel data retention tiers?

Click or press Enter to reveal answer

Answer

Analytics (interactive KQL, supports analytics rules and hunting, 30–730 days, highest cost per GB), Auxiliary (lower cost, KQL search-job query model only, suited for high-volume lower-priority data), Data Lake (lowest cost, archival storage, queryable via search jobs or restoration to Analytics). Per-table configurable.

Click to flip back

Question

What does 'Query Microsoft Purview Audit in Defender XDR' mean?

Click or press Enter to reveal answer

Answer

Microsoft Purview Audit log entries (M365 + Entra audit events) are queryable from the Defender XDR Advanced Hunting surface via KQL β€” typically through `CloudAppEvents` and related tables. Lets SOC analysts join Defender XDR telemetry with Purview Audit data in one query, reducing portal-switching during investigations.

Click to flip back

Question

What is the SC-500 right pattern for human-in-the-loop containment in a Sentinel playbook?

Click or press Enter to reveal answer

Answer

A Sentinel playbook (Logic App) sends a Microsoft Teams adaptive-card approval to a designated approver (e.g. an on-call manager). On approval, the playbook proceeds with the destructive action (disable user in Entra ID, isolate device via MDE). On rejection or timeout, the playbook records the decision and exits without acting.

Click to flip back

Knowledge check

Knowledge Check

Dom at Kestrel Cyber Co-op wants Sentinel incidents from a specific noisy analytics rule (matched scanner traffic from approved IPs) to auto-close as benign without a SOC analyst touching them. Which Sentinel construct fits best?

Knowledge Check

Esme at Northwind Bank has 6 months of NetFlow + firewall log data she wants to keep for incident investigation but rarely queries day-to-day. Which Sentinel retention tier fits?

Knowledge Check

Asha at Aurora Health Service is investigating a Defender XDR incident involving a user. She wants to see, in one KQL query in Defender XDR Advanced Hunting, the user's sign-in events + sent emails + SharePoint access events (Purview Audit) in the incident window. Which surface fits?

What’s next

Final SC-500 module: Microsoft Security Copilot β€” workspaces, RBAC and plugins, enabling Microsoft and Security Store agents. The Microsoft AI assistant for SOC analysts and security engineers.