L17. Automating Response in Microsoft Sentinel: Automation Rules, Playbooks & Data Retention
Video generating
Check back soon for the video lesson on Automating Response in Microsoft Sentinel: Automation Rules, Playbooks & Data Retention
Course outlineLesson 17 of 18
An analytics rule only creates the incident; automation rules and playbooks decide what happens in the seconds after that, and retention settings decide whether last quarter's evidence is still there when an investigator eventually needs it.
Automation Rules
Automation rules are Sentinel's incident-level orchestration layer, deciding what happens the moment an incident is created or updated, without needing a full Logic App for simple actions:- Trigger conditions: run when an incident is created, updated, or (for a specific analytics rule) when an alert fires, optionally filtered further by incident properties (severity, entity type, matched analytics rule)
- Order of operations: multiple automation rules run in a defined order, so a rule that suppresses noisy false-positive incidents can run *before* a rule that would otherwise assign every incident to the on-call queue
- Actions: change incident severity or status, assign an owner, add a tag, add a comment, or invoke a playbook for anything more complex than these built-in actions can express directly
Playbooks
A playbook is simply an Azure Logic App triggered by a Sentinel incident or alert, giving it access to the full Logic Apps connector ecosystem for response actions:
- Disable a compromised user account in Microsoft Entra ID
- Block a malicious IP at the firewall
- Post an incident summary to a Teams channel or create a ticket in an external ITSM system
- Enrich an incident with threat intelligence lookups before an analyst even opens it
Playbooks can be invoked automatically from an automation rule, or run manually by an analyst on demand from within an incident, giving both a "fully automated" and "human-triggered, one-click" path to the same response action.
Data Tiers and Retention
Microsoft Sentinel in the Defender portal distinguishes two tiers:
| Analytics tier | Data lake tier | |
|---|---|---|
| Used for | Real-time analytics rules, hunting, workbooks, high-performance queries | Low-cost long-term storage, KQL and notebook jobs, exploration |
| Default retention | 90 days for Microsoft Sentinel, 30 days for Microsoft Defender XDR | Mirrors analytics retention by default |
| Maximum | Up to two years, at a prorated monthly long-term retention charge | Up to 12 years of total retention |
| Search jobs | Yes | Yes |
| Restore | Yes | No (KQL and notebook jobs can promote data to the analytics tier) |
- Microsoft Sentinel solution tables can keep 90 days of analytics retention without an extra storage charge.
- Defender XDR advanced hunting data is in the analytics tier for 30 days by default. Extending it to 90 days adds ingestion cost but storage stays free; beyond 90 days, storage is charged too.
- Data stored only in the data lake tier isn't available to real-time analytics rules. Moving a table from Analytics to Data Lake stops its real-time rules and hunting queries.
Azure Monitor separately describes Analytics, Basic, and Auxiliary table plans. These names are not interchangeable with the Sentinel tiers above, so check the actual table configuration before deciding where evidence should live.
Microsoft Purview Audit in the Defender Portal
The Defender portal's Audit page searches the Microsoft Purview audit log, which records user and admin activity across Microsoft 365 services. Defender activities such as device isolation, indicator creation, custom detection rule changes, and incident assignment are audited automatically.
- Prerequisites: auditing must be turned on in Microsoft Purview, and the user needs the Audit Logs or View-Only Audit Logs role in Exchange Online.
- Search: filter by activity, date range, and user, then export the results for analysis. The same search is available from the Purview portal's Audit page.
- Retention: depends on Microsoft Purview audit retention policies, not on Sentinel workspace retention.
Verify an Automation and Evidence Plan
- Start with a harmless notification playbook and test its trigger, rule order, permissions, and failure handling.
- Grant Sentinel permission to run the playbook; separately grant its identity the connector permissions needed for its actions.
- Require analyst approval for disruptive containment and document rollback.
- Check the target table plan, retention configuration, and investigation query path. Test retrieval before relying on it for an incident.
- For Microsoft 365 audit evidence, confirm which connector and table ingest the required events. A unified portal does not automatically make every Purview audit record queryable.
Use the Defender portal for new workflows. After March 31, 2027, Sentinel is no longer supported in the Azure portal.
References
- ✓Automation rules use ordered conditions and built-in actions, or invoke Logic App playbooks for integrations
- ✓Automatic and manual playbook execution require appropriate permissions
- ✓Sentinel Analytics and Data Lake tiers differ from Azure Monitor Analytics, Basic, and Auxiliary table plans
- ✓Analytics tier: 90 days default for Sentinel (30 for Defender XDR), extendable to two years; data lake: up to 12 years total
- ✓Restore works only on analytics-tier data; search jobs work in both tiers; KQL and notebook jobs can promote lake data
- ✓Purview Audit in the Defender portal needs auditing on plus the Audit Logs or View-Only Audit Logs role; retention follows Purview audit policies
1. Which component can disable an account and notify an external ticketing system after an incident?
2. What should you verify before depending on older log data for an investigation?
3. An investigator needs 18-month-old firewall logs that now live only in the Sentinel data lake tier. Which option is NOT available for that data?
4. A security admin needs to find who isolated a device from the Defender portal last week. Where should they look?