Microsoft Entra ID must automatically disable accounts after a 35-day period of account inactivity.
Overview
| Finding ID | Version | Rule ID | IA Controls | Severity |
| V-270204 | ENTR-ID-000090 | SV-270204r1085660_rule | CCI-000017 | medium |
| Description | ||||
| Attackers that are able to exploit an inactive account can potentially obtain and maintain undetected access to an application. Owners of inactive accounts will not notice if unauthorized access to their user account has been obtained. Applications need to track periods of user inactivity and disable accounts after 35 days of inactivity. Such a process greatly reduces the risk that accounts will be hijacked, leading to a data compromise. To address access requirements, many application developers choose to integrate their applications with enterprise-level authentication/access mechanisms that meet or exceed access control policy requirements. Such integration allows the application developer to offload those access control functions and focus on core application features and functionality. This policy does not apply to either emergency accounts or infrequently used accounts. Infrequently used accounts are local login administrator accounts used by system administrators when network or normal logon/access is not available. Emergency accounts are administrator accounts created in response to crisis situations. References: https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.users/get-mguser?view=graph-powershell-1.0 https://learn.microsoft.com/en-us/graph/api/user-list?view=graph-rest-1.0&tabs=http https://learn.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0#properties https://learn.microsoft.com/en-us/graph/api/resources/signinactivity?view=graph-rest-1.0#properties For any PowerShell scripts that are Graph, note that Graph endpoints differ depending on where the tenant is located. - For commercial tenants, graph endpoints are graph.microsoft.com. - For GCC High tenants (IL4), graph endpoints are graph.microsoft.us. - For DOD tenants (IL5), graph endpoints are dod-graph.microsoft.us. Satisfies: SRG-APP-000025, SRG-APP-000163 | ||||
| STIG | Date | |||
| Microsoft Entra ID Security Technical Implementation Guide | 2025-03-17 | |||
Related Frameworks
2 mappings across 3 frameworks
Related Frameworks
SCF0 mappings
No source states a mapping between these directly.
Also reachable in 3 hops (1) derived by us, not asserted by any source
Each of these is a route we composed by chaining published mappings. No publisher states a relationship between the two endpoints.
- DISA STIG Benchmark (XCCDF)V1R1intersects(normalised)
- DISA CCI List2025-01-23equal to(normalised)
- SCF Secure Traceability Relationship Mapping (STRM)2026.2equal to
NIST 800-530 mappings
No source states a mapping between these directly.
Also reachable in 2 hops (71) derived by us, not asserted by any source
Each of these is a route we composed by chaining published mappings. No publisher states a relationship between the two endpoints.
- DISA STIG Benchmark (XCCDF)V1R1intersects(normalised)
- DISA STIG Benchmark (XCCDF)V1R1our copyintersects(normalised)
- DISA STIG Benchmark (XCCDF)V1R1intersects(normalised)
- DISA CCI List2025-01-23equal to(normalised)
- DISA STIG Benchmark (XCCDF)V1R1intersects(normalised)
- DISA STIG Benchmark (XCCDF)V1R1our copyintersects(normalised)
- DISA STIG Benchmark (XCCDF)V1R1intersects(normalised)
- DISA CCI List2025-01-23equal to(normalised)
- DISA STIG Benchmark (XCCDF)V1R1intersects(normalised)
- DISA STIG Benchmark (XCCDF)V1R1our copyintersects(normalised)
- DISA STIG Benchmark (XCCDF)V1R1intersects(normalised)
- DISA CCI List2025-01-23equal to(normalised)
- DISA STIG Benchmark (XCCDF)V1R1intersects(normalised)
- DISA STIG Benchmark (XCCDF)V2R3our copyintersects(normalised)
- DISA STIG Benchmark (XCCDF)V2R3intersects(normalised)
- DISA CCI List2025-01-23equal to(normalised)
- DISA STIG Benchmark (XCCDF)V1R1intersects(normalised)
- DISA STIG Benchmark (XCCDF)2our copyintersects(normalised)
- DISA STIG Benchmark (XCCDF)2intersects(normalised)
- DISA CCI List2025-01-23equal to(normalised)
- DISA STIG Benchmark (XCCDF)V1R1intersects(normalised)
- DISA STIG Benchmark (XCCDF)2our copyintersects(normalised)
- DISA STIG Benchmark (XCCDF)2intersects(normalised)
- DISA CCI List2025-01-23equal to(normalised)
- DISA STIG Benchmark (XCCDF)V1R1intersects(normalised)
- DISA STIG Benchmark (XCCDF)2our copyintersects(normalised)
- DISA STIG Benchmark (XCCDF)2intersects(normalised)
- DISA CCI List2025-01-23equal to(normalised)
- DISA STIG Benchmark (XCCDF)V1R1intersects(normalised)
- DISA STIG Benchmark (XCCDF)2our copyintersects(normalised)
- DISA STIG Benchmark (XCCDF)2intersects(normalised)
- DISA CCI List2025-01-23equal to(normalised)
- DISA STIG Benchmark (XCCDF)V1R1intersects(normalised)
- DISA CCI List2025-01-23equal to(normalised)
- DISA STIG Benchmark (XCCDF)V1R1intersects(normalised)
- DISA STIG Benchmark (XCCDF)2our copyintersects(normalised)
- DISA STIG Benchmark (XCCDF)2intersects(normalised)
- DISA CCI List2025-01-23equal to(normalised)
+61 more (top 10 by confidence shown)
CCI2 mappings
CCI-000017
1.00
- DISA STIG Benchmark (XCCDF)V1R1intersects(normalised)
CCI-003627
1.00
- DISA STIG Benchmark (XCCDF)V1R1intersects(normalised)
Details
Check Text (C-270204r1085660_chk)
Verify Entra ID disables accounts after 35 days of inactivity.
Use the following procedure to discover inactive user accounts in Entra ID (35+ days) via the use of the Graph PowerShell SDK.
Installation instructions:
https://learn.microsoft.com/en-us/powershell/microsoftgraph/installation?view=graph-powershell-1.0
Required roles:
At least Global Reader
Required tenant license:
Entra ID Premium P1
Example PowerShell commands:
Connect-MgGraph -Scopes AuditLog.Read.All,User.Read.All -Environment USGov
$inactiveDate = (Get-Date).AddDays(-35)
$users = Get-MgUser -All:$true -Property Id, DisplayName, UserPrincipalName, UserType, createdDateTime, SignInActivity, AccountEnabled | Where-Object { $_.AccountEnabled -eq $true }
$inactiveUsers =
$users | Where-Object {
($_.SignInActivity.LastSignInDateTime -lt $inactiveDate) -or ($_.SignInActivity.LastSignInDateTime -eq $null -and $_.CreatedDateTime -lt $inactiveDate)
} | Select-Object DisplayName, UserPrincipalName, UserType, createdDateTime, @{Name = 'LastSignInDateTime'; Expression = {($_.SignInActivity).LastSignInDateTime}}, Id | Sort-Object LastSignInDateTime
$inactiveUsers | Format-Table -AutoSize
If accounts are not disabled after a 35-day period of account inactivity, this is a finding.
Fix Text (F-74138r1085612_fix)
1. Sign in to the Microsoft Entra admin center as at least a Reports Reader.
2. Browse to Identity >> Users >> All users.
3. Select a user from the list.
4. Use the following procedure to disable inactive user accounts in Entra ID via the use of the Graph PowerShell SDK.
Installation instructions:
https://learn.microsoft.com/en-us/powershell/microsoftgraph/installation?view=graph-powershell-1.0
Required roles:
Global Administrator
Install the Microsoft Graph PowerShell SDK.
Install-Module Microsoft.Graph -Scope CurrentUser
Connect-MgGraph -Scopes "User.ReadWrite.All", "Directory.ReadWrite.All", "SignInActivity.Read.All"
# Set the inactivity threshold (in days)
$inactivityThreshold = 35
# Get the current date
$currentDate = Get-Date
# Get all users and their last sign-in activity
$users = Get-MgUser -All -Property "DisplayName", "SignInActivity"
# Filter for inactive users
$inactiveUsers = $users | Where-Object {
$_.SignInActivity.LastSignInDateTime -lt ($currentDate.AddDays(-$inactivityThreshold))
}
# Disable inactive users
foreach ($user in $inactiveUsers) {
Set-MgUser -UserId $user.Id -AccountEnabled $false
Write-Host "Disabled user: $($user.DisplayName)"
}