# Privileged access to systems and their resources is disabled after 45 days of inactivity

Privileged access to systems and their resources is disabled after 45 days of inactivity (ISM-1648, Essential Eight Maturity Level Two).

Source: https://maester.dev/docs/tests/ASD.ISM-1648

<!-- 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/jusso-dev" title="jusso-dev · Original author"><img src="https://github.com/jusso-dev.png" alt="jusso-dev" 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/jusso-dev">jusso-dev</a></span><a class="test-byline-link" href="/contributors">All contributors →</a></div></div>

<p class="test-part">Part of <a href="/docs/tests/asd">ASD</a> · Entra ID · Roles and administrators · <a href="/docs/tests">All checks</a></p>

```powershell title="Run this check"
Invoke-Maester -TestId ASD.ISM-1648
```

## Overview

Privileged access to systems and their resources is disabled after 45 days of inactivity (ISM-1648, Essential Eight Maturity Level Two).

An administrator account nobody uses is an account nobody watches. Its password ages, its owner may have moved on, and a sign-in on it is unlikely to be questioned. This check lists the users with an active or eligible assignment to a directory role that Microsoft Entra marks as privileged, directly or through a role-assignable group, and reads the last sign-in of each. An enabled account fails when its most recent interactive or non-interactive sign-in is older than 45 days (the `InactiveDays` parameter), or when it has never signed in and was created before that. Emergency access accounts named in the Maester configuration (`EmergencyAccessAccounts`) are left out, because they are meant to stay unused.

[MT.1029](https://maester.dev/docs/tests/MT.1029) reports the same accounts through the Privileged Identity Management alert for stale accounts, whose number of days each tenant sets. ASD names 45 days, so this check reads the sign-ins itself. ASD's own assessment script leaves out accounts that have never signed in; this check counts them, because an administrator account created more than 45 days ago and never used is just as inactive.

#### Remediation action

1. In **Microsoft Entra admin center**, open **[Users](https://entra.microsoft.com/#view/Microsoft_AAD_UsersAndTenants/UserManagementMenuBlade/~/AllUsers)** and check each account listed below with its owner.
2. Remove the privileged role in **Roles & administrators**, or disable the account under **Edit properties** > **Account enabled**.
3. Turn on the **Stale sign-ins** alert in **Privileged Identity Management** > **Alerts** > **Settings**, and configure an access review of the privileged roles so inactive access is removed before this check fails again.

#### Related links

* [Essential Eight maturity model](https://www.cyber.gov.au/business-government/asds-cyber-security-frameworks/essential-eight/essential-eight-maturity-model)
* [Security alerts for Microsoft Entra roles in PIM](https://learn.microsoft.com/entra/id-governance/privileged-identity-management/pim-how-to-configure-security-alerts)
* [How to manage inactive user accounts](https://learn.microsoft.com/entra/identity/monitoring-health/howto-manage-inactive-user-accounts)

## Details

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

| Field | Value |
| --- | --- |
| Test ID | ASD.ISM-1648 |
| Severity | Medium |
| Suite | ASD |
| Product | Entra ID |
| Feature | Roles and administrators |
| Area | Privileged access |
| Resource type | User |
| User impact | Low |
| Implementation cost | Medium |
| MITRE ATT&CK | T1078.004 Cloud Accounts |
| Supports benchmark | ASD Essential Eight maturity model (version 2026.09.4), requirement ISM-1648 |
| Benchmark level | ML2 |
| Essential Eight strategy | Restrict administrative privileges |
| Supports controls | essential-eight:ISM-1648, nist-800-53-r5:AC-2(3), ism:ISM-1648 |
| PowerShell test | [Test-MtAsdInactivePrivilegedAccess](https://github.com/maester365/maester/blob/main/tests/asd/entra/Test.ASD.ISM-1648.ps1) |
| Services | Graph |
| Compatible licenses | AAD_PREMIUM |

</details>

## Source

- Test: [`tests/asd/entra/Test.ASD.ISM-1648.ps1`](https://github.com/maester365/maester/blob/main/tests/asd/entra/Test.ASD.ISM-1648.ps1)
- Documentation: [`tests/asd/entra/Test.ASD.ISM-1648.md`](https://github.com/maester365/maester/blob/main/tests/asd/entra/Test.ASD.ISM-1648.md)
