AD-USER-08 - Never-logged-in enabled user count should be retrievable
Overviewโ
Enabled accounts that have never logged on may indicate incomplete provisioning, abandoned onboarding, or unnecessary standing access. These objects should be reviewed to ensure they still have a valid business purpose.
Security Recommendationโ
Investigate enabled accounts with no recorded logon activity. Disable or remove unused accounts and make sure future provisioning workflows include validation and cleanup steps.
How the Test Worksโ
This test retrieves Active Directory user data from Get-MtADDomainState, filters to enabled users, and counts accounts where LastLogonDate is null.
Related Testsโ
Test-MtAdUserDormantEnabledCountTest-MtAdUserDisabledCountTest-MtAdUserPasswordNeverExpiresCount
Test Metadataโ
| Field | Value |
|---|---|
| Test ID | AD-USER-08 |
| Severity | Info |
| Suite | Active Directory |
| Category | AD.User |
| PowerShell test | Test-MtAdUserNeverLoggedInCount |
| Tags | AD, AD-USER-08, AD.User |
Sourceโ
- Pester test:
tests/ad/user/Test-MtAdUserNeverLoggedInCount.Tests.ps1 - PowerShell source:
powershell/public/ad/user/Test-MtAdUserNeverLoggedInCount.ps1

