# Interactive and long-term retention duration meets the security baseline on every Microsoft Sentinel workspace

Detection and incident response are bounded by data lifetime: an analytics rule, hunting query, or post-breach investigation can only see what is still in…

Source: https://maester.dev/docs/tests/ZTA.41204

<!-- This file is generated by website/scripts/generate-test-docs.mjs. Do not edit manually. -->

## Overview

Detection and incident response are bounded by data lifetime: an analytics rule, hunting query, or post-breach investigation can only see what is still in the workspace at the moment the query runs. Microsoft Sentinel separates retention into an interactive window (retentionInDays, the surface used by analytics rules, UEBA, and KQL hunting) and a total window (totalRetentionInDays, which adds Archive — accessible through search jobs and restore — on top of the interactive window). Threat-actor dwell time exceeds Sentinel's default 30-day interactive window in a meaningful share of intrusions: living-off-the-land persistence, valid-account abuse (, /), and supply-chain compromise commonly precede detection by months. Without an explicit retention configuration, evidence required to reconstruct the kill chain is silently dropped: incident responders cannot pivot from a freshly discovered indicator back into Entra sign-in logs, Defender alerts, or proxy logs from 90 or 180 days ago, breaking timeline reconstruction. Compliance regimes (PCI DSS, ISO 27001, HIPAA, SOC 2) also impose log-retention floors that the Sentinel default does not satisfy. This check evaluates retention duration only; the storage plane the data sits on (Analytics vs. Basic vs. Auxiliary) is evaluated by spec 41217, and the Microsoft Sentinel data lake long-term plane is evaluated by spec 41218.

## Remediation

- [Configure the default analytics retention period of a workspace](https://learn.microsoft.com/azure/azure-monitor/logs/data-retention-configure#configure-the-default-analytics-retention-period-of-analytics-tables)
- [Configure table-level retention](https://learn.microsoft.com/azure/azure-monitor/logs/data-retention-configure#configure-table-level-retention)

## Run it

The check runs as part of the whole assessment, with the ZeroTrustAssessment module installed:

```powershell
Install-Module ZeroTrustAssessment -Scope CurrentUser
Connect-Maester
Invoke-Maester -Pack ZTA -SkipBuiltIn
```

Leave out `-SkipBuiltIn` to run Maester's own checks in the same run.

<details>
<summary>About this check</summary>

| | |
| --- | --- |
| Severity | Medium |
| Effort to fix | Low |
| Impact on users | Low |
| Pillar | SecOps |
| Category | Security information and event management |
| Product | [Azure](/docs/tests/products/azure) |
| Feature | Microsoft Sentinel |
| Area | Logging and detection |
| Licence | Consumption-based: Microsoft Sentinel |
| Tenant | Workforce |

Product, feature, area and ATT&CK are Maester's: the assessment does not record them, so Maester keeps them in the pack's `taxonomy.json`.

</details>

<p class="mt-ms-note not-content"><svg class="mt-ms-note__logo" viewBox="0 0 21 21" aria-hidden="true"><rect width="10" height="10" fill="#f25022"/><rect x="11" width="10" height="10" fill="#7fba00"/><rect y="11" width="10" height="10" fill="#00a4ef"/><rect x="11" y="11" width="10" height="10" fill="#ffb900"/></svg><span>A Microsoft check, part of the <a href="/docs/tests/packs/zero-trust-assessment">Zero Trust Assessment</a> pack. Text from ZeroTrustAssessment 3.1.0, © Microsoft, <a href="/docs/tests/packs/zero-trust-assessment#licence">MIT licence</a>.</span></p>
