# (L2) Ensure 'Idle session timeout' is set to '3 hours (or less)' for unmanaged devices

Browser sessions on unmanaged devices for Microsoft 365 apps end after at most three hours of inactivity.

Source: https://maester.dev/docs/tests/CIS.M365.1.3.2

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

<div class="test-byline"><div class="test-byline-avatars"><a class="test-byline-avatar test-byline-avatar--author" href="/contributors/jeremyfinney-lgtm" title="jeremy finney · Original author"><img src="https://github.com/JeremyFinney-lgtm.png" alt="jeremy finney" width="28" height="28" loading="lazy" decoding="async" /></a></div><div class="test-byline-meta"><span class="test-byline-text">Contributed by <a href="/contributors/jeremyfinney-lgtm">jeremy finney</a></span><a class="test-byline-link" href="/contributors">All contributors →</a></div></div>

<p class="test-part">Part of <a href="/docs/tests/cis">CIS</a> · Microsoft 365 · Organization settings · <a href="/docs/tests">All checks</a></p>

```powershell title="Run this check"
Invoke-Maester -TestId CIS.M365.1.3.2
```

## Overview

Browser sessions on unmanaged devices for Microsoft 365 apps end after at most three hours of inactivity.

A browser that someone leaves open on a shared or personal computer keeps the Microsoft 365 session signed in. Anyone who walks up to it, or any malware that runs on it, can use the session. A short idle timeout signs the user out of the web apps when nothing happens for a while.

Two parts are needed: an activity-based timeout policy with a web session idle timeout of 3 hours or less, and a Conditional Access policy that uses **Use app enforced restrictions** for browser access to Office 365 so that the timeout applies to unmanaged devices. The test looks at both.

User and group exclusions are not evaluated by this test. Application exclusions are also not evaluated when the policy targets all apps; verify exclusions are documented and reviewed annually. A condition that narrows the policy is reported unless the check is about that condition.

#### Remediation action

1. Sign in to the [Microsoft 365 admin center](https://admin.microsoft.com).
2. Go to **Settings** > **Org settings** > **Security & privacy** > [**Idle session timeout**](https://admin.microsoft.com/#/Settings/SecurityPrivacy/:/Settings/L1/IdleSessionTimeout) and turn it on with a timeout of 3 hours or less.
3. Sign in to the [Microsoft Entra admin center](https://entra.microsoft.com) and go to **Entra ID** > **Conditional Access** > **Policies**.
4. Create a policy for **All users** and the **Office 365** app, with **Client apps** set to **Browser** only. Under **Session**, select **Use app enforced restrictions** and enable the policy.

#### Related links

* [Microsoft 365 admin center - Idle session timeout](https://admin.microsoft.com/#/Settings/SecurityPrivacy/:/Settings/L1/IdleSessionTimeout)
* [Idle session timeout for Microsoft 365](https://learn.microsoft.com/microsoft-365/admin/manage/idle-session-timeout-web-apps)
* [Conditional Access: session controls](https://learn.microsoft.com/entra/identity/conditional-access/concept-conditional-access-session)
* [CIS Microsoft 365 Foundations Benchmark v7.0.0 - 1.3.2](https://www.cisecurity.org/benchmark/microsoft_365)

## Details

<details>
<summary>Every attribute of this check</summary>

| Field | Value |
| --- | --- |
| Test ID | CIS.M365.1.3.2 |
| Severity | Medium |
| Suite | CIS |
| Product | Microsoft 365 |
| Related products | Entra ID |
| Feature | Organization settings |
| Area | Authentication |
| Resource type | Tenant |
| User impact | Medium |
| Implementation cost | Medium |
| MITRE ATT&CK | T1550.004 Web Session Cookie |
| Supports benchmark | CIS Microsoft 365 Foundations Benchmark (version 7.0.0), requirement 1.3.2 |
| Benchmark level | L2 |
| Benchmark profiles | E3 Level 2 |
| Supports controls | cis-m365:1.3.2, nist-800-53-r5:AC-12 |
| PowerShell test | [Test-MtCisIdleSessionTimeout](https://github.com/maester365/maester/blob/main/tests/cis/Test.CIS.M365.1.3.2.ps1) |
| Services | Graph |
| Compatible licenses | AAD_PREMIUM |

</details>

## Source

- Test: [`tests/cis/Test.CIS.M365.1.3.2.ps1`](https://github.com/maester365/maester/blob/main/tests/cis/Test.CIS.M365.1.3.2.ps1)
- Documentation: [`tests/cis/Test.CIS.M365.1.3.2.md`](https://github.com/maester365/maester/blob/main/tests/cis/Test.CIS.M365.1.3.2.md)
