Microsoft 365 Best Practices Library · Identity and sign-in

Account lockout policy best practices for Active Directory and Microsoft Entra ID

An account lockout policy decides what happens when a password is entered wrongly too many times. Set too loose, it lets an attacker keep guessing. Set too tight, it lets anyone lock your staff out, and fills the help desk with calls. This guide explains how lockout works in on-premises Active Directory and in Microsoft Entra ID, which values to use, how to make the two work together, and how to find the real cause when one account keeps locking.

Prefer to have it done for you? IT Perfection provides Entra ID and Conditional Access setup for companies in Irvine, Orange County and Los Angeles County.

Ali Hassani, CISSP and Certified CISO, IT PerfectionWritten by Ali Hassani, CISSP and C|CISO · 25+ years designing, securing and supporting business networks · Updated November 2026

Manager using a laptop with colleagues talking behind him
1 · MeasureWe look at how often accounts lock today, and why.

Microsoft 365 Best Practices Library › Identity and sign-in › Account lockout policy

What it isThe rules that temporarily block an account after repeated wrong passwords: how many attempts, for how long, and when the count starts again.
Where it livesOn-premises: Group Policy › Account Policies › Account Lockout Policy. Cloud: Microsoft Entra admin center › Entra ID › Authentication methods › Password protection
License neededActive Directory lockout policy is part of Windows Server. Entra smart lockout is always on for every tenant; changing its values needs Microsoft Entra ID P1.
Time to set upOne to two hours to review and align the settings; investigations of repeat lockouts vary.
Risk if missingMedium No lockout allows unlimited password guessing; an over-strict lockout lets an outsider deny service to your own users.

Why it matters

A balance between stopping guesses and keeping people working

A lockout policy has one job: to make guessing a password slow enough to be impractical. If an attacker can try thousands of passwords against one account without consequence, a weak password will eventually fall. A threshold stops that after a handful of attempts.

The same rule can be turned against you. If an account locks for thirty minutes after three wrong passwords, anyone who knows a user name can lock that person out, on purpose or by accident, simply by typing rubbish three times. Do it to every account in the company and nobody can work. A phone with an old saved password does the same thing to its owner, every few minutes, all day.

So the right policy is not the strictest one. It is one that slows an attacker to a crawl, recovers by itself in a short time, and does not generate more help-desk calls than it prevents break-ins. Two things have changed the balance in the last few years. Multifactor authentication means a guessed password is no longer enough to get in. And Microsoft Entra ID now applies a smarter form of lockout in the cloud that can tell a familiar location from an unfamiliar one. Both let you choose less punishing values on-premises than was once the fashion.

The identity planes

Lockout happens in more than one place

In an organization with both a Windows domain and Microsoft 365, a wrong password can be counted by different systems depending on where it was typed. Knowing which system counted it is the first step in every investigation.

On-premises Active DirectoryCounts wrong passwords at the Windows sign-in screen, on file shares, on Wi-Fi and VPN that use domain accounts, and from services and scheduled tasks. Governed by Group Policy.
Microsoft Entra ID (cloud)Counts wrong passwords for Microsoft 365 and other cloud sign-ins. Governed by smart lockout, which is always on.
In between: sync and pass-throughWith password hash sync, cloud sign-ins are checked in the cloud. With pass-through authentication or federation, a cloud sign-in is passed to your domain controllers and can count there too.
Devices and applicationsNot a place where lockout is decided, but where most lockouts start: saved passwords on phones, mapped drives, mail apps and old Wi-Fi profiles.

In the cloud

How Microsoft Entra smart lockout works

Smart lockout is always on for every Microsoft Entra tenant. You do not enable it, and on plans without Entra ID P1 you cannot change its values. It differs from the classic domain lockout in ways that matter.

BehaviorWhat Microsoft documents
Default threshold10 failed attempts in Azure Public tenants (3 in Azure US Government tenants)
Default duration60 seconds for the first lockout, longer after repeated lockouts; the rate of increase is not disclosed
Repeated identical wrong passwordNot counted again: the last three bad password hashes are tracked, so the same wrong password entered several times does not lock the account
Familiar and unfamiliar locationsCounted separately, so an attacker elsewhere is less likely to lock out the genuine user at their usual location
After a lockoutThe user can use self-service password reset; choosing “I forgot my password” resets the lockout duration
Administrator actionAn administrator can unlock a cloud account without waiting
With pass-through authenticationHash tracking is not available, because the password is checked on-premises

Source: Protect user accounts from attacks with Microsoft Entra smart lockout, Microsoft Learn.

The practical result is that the cloud side needs little tuning. A person who repeatedly types the same old password is not punished, a sprayed guess from the other side of the world lands on a different counter, and the lock clears itself in a minute. Microsoft also notes that it blocks sign-ins it judges malicious by default and returns error code 50053, whatever the lockout settings.

On-premises

The Active Directory account lockout policy

In a Windows domain the policy has three linked settings, found in Group Policy under Computer Configuration > Policies > Windows Settings > Security Settings > Account Policies > Account Lockout Policy. The domain-wide values come from the policy linked at the domain level, normally the Default Domain Policy.

SettingWhat it doesNotes
Account lockout thresholdThe number of wrong passwords that locks the account0 means accounts never lock. Very low values cause accidental lockouts.
Account lockout durationHow long the account stays locked0 means it stays locked until an administrator unlocks it, which is rarely a good choice.
Reset account lockout counter afterHow long before the count of wrong attempts returns to zeroMust be less than or equal to the lockout duration.
Allow Administrator account lockoutWhether the built-in Administrator account can be lockedAvailable on current Windows versions; check your baseline.

Microsoft publishes recommended values in its Windows security baselines, and these have become less severe over time; recent baselines use a threshold of 10 attempts with a short duration and reset period. Treat the current baseline for your Windows version as the starting point, and check it directly in the Windows security baselines documentation before you set values, because Microsoft revises them.

Where one group needs different rules, such as administrators or service accounts, a fine-grained password policy can apply different lockout values to a security group without changing the domain default. Use these sparingly and document each one; a forgotten exception is harder to find than a forgotten setting.

Hybrid

Make the cloud and the domain work together

If your accounts are synchronized from Active Directory to Microsoft Entra ID, the two lockout systems should be set so that the cloud absorbs internet-facing guessing before it can lock accounts in your domain. Microsoft gives specific guidance for tenants that use pass-through authentication.

RuleMicrosoft’s guidanceExample
ThresholdsThe Microsoft Entra lockout threshold must be less than the AD DS threshold; set AD DS at least two or three times greaterEntra 10, Active Directory 20
DurationsThe Microsoft Entra lockout duration must be longer than the AD DS durationEntra 120 seconds, Active Directory 1 minute
UnitsEntra duration is in seconds; AD DS duration is in minutesConvert before comparing

The reasoning is simple. If the cloud locks first and stays locked longer, an attacker spraying passwords at Microsoft 365 is stopped at the cloud, and the on-premises account, which your staff need for the office network, never reaches its own threshold.

Microsoft recommends moving from federation with AD FS to managed authentication. If you still run AD FS, its extranet lockout features provide similar protection and need their own review.

Before you start

What to have ready

The right rolesGroup Policy changes need a domain administrator. Smart lockout values need at least Authentication Policy Administrator.
Today’s numbersHow many lockouts happen in a normal week, and which accounts. Without a baseline you cannot tell whether a change helped.
A list of service accountsAccounts used by services, scheduled tasks, scanners and applications. They are the ones most damaged by a careless policy.
An agreed help-desk procedureHow a user proves who they are before an account is unlocked, and who is allowed to unlock.

Step by step

Review and set the policy in six steps

  1. Read the current on-premises policy

    Group Policy Management › Default Domain Policy › Account Lockout Policy

    Record the three values. Then confirm what is really applied by running net accounts /domain on a domain-joined computer; it shows the effective lockout threshold, duration and observation window. Check for fine-grained password policies with Get-ADFineGrainedPasswordPolicy -Filter * so that no group has different rules you did not know about.

  2. Read the cloud values

    Microsoft Entra admin center › Entra ID › Authentication methods › Password protection

    Record the Lockout threshold and Lockout duration in seconds. On a tenant without Entra ID P1 these show the defaults and cannot be changed. Note your sign-in method (password hash sync, pass-through authentication or federation), because it decides whether step 4 matters to you.

  3. Measure how often accounts lock, and where

    Domain controller › Event Viewer › Security log; Entra ID › Sign-in logs

    On-premises, event 4740 is written when an account is locked; it is recorded on the domain controller that holds the PDC emulator role and names the computer the attempts came from. In the cloud, filter the sign-in logs for error code 50053. A week of each gives you the picture: a few scattered lockouts are normal; the same account every day, or many accounts at once, is a pattern to investigate.

  4. Choose and align the values

    Start from Microsoft’s current Windows security baseline for the domain and the smart lockout defaults for the cloud. If you use pass-through authentication, set the domain threshold at least two to three times the cloud threshold and the cloud duration longer than the domain duration. Prefer a lock that clears by itself over one that needs an administrator. Write down the values and the reason for each.

  5. Apply the change and tell the help desk

    Group Policy Management › edit the domain-level policy

    Change the policy linked at the domain level; account policies set on other organizational units do not affect domain accounts. Allow time for replication, then confirm with net accounts /domain. Tell the help desk what changed and what a locked user will now experience, so the advice they give matches the policy.

  6. Measure again after two weeks

    Compare lockout counts with the baseline from step 3. Fewer accidental lockouts and no rise in suspicious failures is the result you want. Any account that still locks repeatedly is not a policy problem; it has a specific cause, and the next section shows how to find it.

Investigation

When one account keeps locking: find the source first

The most common mistake is to unlock the account, see it lock again ten minutes later, unlock it again, and repeat. Something is sending the old password. Until that device or service is found, the lockout will continue, and raising the threshold only hides it.

Likely sourceHow it shows upFix
Phone or tablet mail app with an old passwordLockouts start right after a password change, at regular intervalsUpdate or remove the account on the device
Mapped drive or saved credential on another computerCaller computer is one the user signed in to in the pastClear saved credentials in Credential Manager
Scheduled task or service running as the userLockouts at fixed times; caller is a serverMove it to a proper service account
Disconnected remote desktop sessionAn old session keeps using the old passwordSign the session out
Wi-Fi or VPN profile with saved domain credentialsLockouts when the device is in range of the officeForget the network and reconnect
Password guessing from outsideMany accounts, attempts from unfamiliar addresses, in the cloud logsConfirm MFA and legacy authentication blocking; consider a location policy
An application with the old password storedCaller is an application serverUpdate the stored credential

Useful commands on-premises: Search-ADAccount -LockedOut lists accounts that are locked now; Get-ADUser name -Properties LockedOut,BadLogonCount,LastBadPasswordAttempt shows the state of one account; Unlock-ADAccount name unlocks it. Alongside event 4740, events 4625, 4771 and 4776 on domain controllers record the individual failed attempts and the address or workstation each came from.

Recommended values

Lockout settings at a glance

SettingRecommended approachWhy
Entra smart lockout thresholdLeave at the default of 10 unless you have a reasonMicrosoft describes the defaults as the right mix of security and usability.
Entra smart lockout durationDefault 60 seconds; longer than the domain duration if you use pass-through authenticationLets the cloud absorb attacks first.
Domain lockout thresholdFollow the current Microsoft security baseline; never below 5Very low values lock out genuine users.
Domain lockout durationA short, fixed time; not “until an administrator unlocks”Self-healing, and no route to a denial of service.
Reset counter afterEqual to or shorter than the durationRequired by the policy and simpler to explain.
Service accountsManaged service accounts where possible; long random passwords; monitoredThey cannot recover from a lockout by themselves.
AdministratorsSeparate admin accounts with MFA; consider a fine-grained policyHigh-value accounts deserve their own rules.
MFARequired for all cloud sign-insA guessed password alone no longer opens the account.

We do not print one fixed set of numbers for every organization, because the right values depend on your sign-in method, your Windows versions and your help-desk capacity. The baseline documents and the alignment rules above are the stable part.

Governance

Make the decision defensible

An auditor, an insurer or a new IT manager will one day ask why the policy is what it is. A short written record answers the question and stops the values drifting.

  • Record the values and the source. For example: “Domain threshold and duration follow the Microsoft security baseline for our Windows Server version, reviewed on this date.”
  • Record each exception. Which group, which values, why, who approved it and when it will be reviewed.
  • Record who may unlock accounts. And how the user’s identity is confirmed first. Unlocking on the strength of a phone call from an unknown number is a known social-engineering route.
  • Review after any identity change. A move to password hash sync, the retirement of AD FS or a new Windows Server version are all reasons to look again.

Measurement

Measure outcomes, not the setting

The policy is a means. What you care about is whether guessing is being stopped and whether staff are being disrupted. Four numbers, looked at monthly, tell you.

MeasureWhere to get itWhat good looks like
Lockouts per weekEvent 4740 count; cloud error 50053 countLow and stable
Repeat lockouts on the same accountSame sourcesNear zero after investigation
Help-desk unlock requestsYour ticket systemFalling after self-service reset is in place
Failed sign-ins from unfamiliar locationsEntra sign-in logsPresent but not succeeding

Mistakes and rollback

Common mistakes, and how to step back

  • A threshold of 3 with a long lock. Feels secure; in practice it is a tool for locking out your own staff.
  • Lockout until an administrator unlocks. Turns every mistake into a ticket and every attack into an outage.
  • No lockout at all. A threshold of 0 allows unlimited guessing on-premises.
  • Unlocking repeatedly without finding the source. The device with the old password is still there.
  • Raising the threshold to stop one noisy account. You have weakened the policy for everyone to avoid one investigation.
  • Ignoring the cloud side, or the domain side. In a hybrid setup each can lock an account the other knows nothing about.
  • Treating lockout as the defense against password spray. A spray tries one or two passwords per account and stays under any threshold. MFA and blocking legacy authentication are the controls for that.
  • Service accounts under the user policy. One wrong password in a script can stop a business application.

To roll back: the previous values are in your record from steps 1 and 2. Set the Group Policy back and confirm with net accounts /domain; set smart lockout back on the Password protection page. Accounts locked under the old values clear when the duration expires, or an administrator can unlock them.

The wider picture

Lockout is one layer of several

Lockout slows guessing. It does not stop a correct password that was phished or reused from another site, and it does not notice a spray that tries one password on a thousand accounts. Those need other layers, and each has its own guide in this library.

MFAMakes a correct password insufficient without a second step.
Block legacy authenticationRemoves the sign-in paths that skip MFA and are favored for guessing.
Banned passwordsMicrosoft Entra password protection rejects common and custom weak passwords, on the same admin page as smart lockout.
Sign-in log reviewShows the guessing that lockout absorbed, and anything that got through.

Licenses

Which plan gives you what

CapabilityLicense
Active Directory account lockout policyIncluded with Windows Server Active Directory
Entra smart lockout with default valuesEvery Microsoft Entra tenant
Custom smart lockout valuesMicrosoft Entra ID P1 or higher
Custom banned password list; on-premises password protection agentMicrosoft Entra ID P1 or higher
Self-service password reset with writeback to Active DirectoryMicrosoft Entra ID P1

Plans and names change; check the current Microsoft Entra licensing page before you buy anything.

Have us do it

Prefer to hand this off?

IT Perfection reviews account lockout for companies in Irvine, Orange County and Los Angeles County: the current values on-premises and in the cloud, alignment for your sign-in method, a written record of the decision, and investigation of the accounts that keep locking. You receive a written scope and a written quote before any work starts.

Ali Hassani, CISSP and Certified CISO, IT Perfection

Who does the work

Written by Ali Hassani, CISSP, C|CISO

Ali Hassani has 25+ years of hands-on experience in IT operations, cybersecurity, Microsoft infrastructure, network security and Azure, and works with businesses in Irvine, Orange County and Los Angeles County. Design, implementation and troubleshooting work is planned and reviewed by Ali personally.

This guide is for education and planning. It does not replace a professional audit, compliance assessment or vendor engineering review. Updated November 2026.

ISC2 CISSP badgeEC-Council Certified CISO (C|CISO) badgeCisco CCNP Routing and Switching badgeMCSE: Server Infrastructure badgeMicrosoft MCSE badgeMCSA: Security badgeCisco CCNA Cybersecurity badgeMCITP badge

FAQ

Account lockout policy: common questions

What is a good account lockout threshold?

Microsoft’s recent Windows security baselines and the Entra smart lockout default both use 10 failed attempts; check the current baseline for your Windows version. Very low thresholds such as 3 lock out genuine users and make it easy for an outsider to deny service.

What is Microsoft Entra smart lockout?

Smart lockout is the cloud lockout feature that is always on for every Microsoft Entra tenant. By default it locks an account after 10 failed attempts for 60 seconds, increasing after repeated lockouts, and it counts familiar and unfamiliar locations separately.

Can I change the smart lockout settings?

Yes, with Microsoft Entra ID P1 or higher, on the Password protection page under Authentication methods. Without P1 the default values apply and cannot be changed.

Why does my account keep getting locked out?

Usually a device or service is still using an old password: a phone mail app, a mapped drive, a scheduled task, a disconnected remote session or a saved Wi-Fi profile. Event 4740 on the domain controller names the computer the attempts came from.

Should accounts stay locked until an administrator unlocks them?

Generally no. A short lockout that clears by itself stops guessing just as well and avoids both a flood of help-desk calls and an easy way to lock out the whole company.

How should Entra and Active Directory lockout settings relate?

With pass-through authentication, Microsoft says the Entra threshold must be lower than the Active Directory threshold, by a factor of two to three, and the Entra duration must be longer than the Active Directory duration.

Does account lockout stop password spray attacks?

Not reliably. A password spray tries only one or two passwords per account, which stays under the threshold. MFA and blocking legacy authentication are the main defenses.

Which event ID shows an account lockout?

Event 4740 in the Security log, recorded on the domain controller that holds the PDC emulator role. Events 4625, 4771 and 4776 record the failed attempts that led to it.

Would you rather hand this off?

Active Directory password and lockout policy review

We review your domain password and lockout settings and find what is causing repeat lockouts.

  • Review of the default domain policy and any fine-grained password policies
  • The source of repeat lockouts traced and resolved
  • Recommended settings applied after your approval, with written notes

Each project has a written scope and a written quote before any work starts.

Need this done for your business?

IT Perfection plans, installs and supports this for companies in Irvine and Orange County

The guides explain the steps. If you would rather have it done, planned and documented by an experienced engineer, these are the services that cover it. Design, implementation and troubleshooting work is planned and reviewed by Ali Hassani personally.

Active Directory management

Users, groups, OUs, DNS and domain controllers kept clean and healthy.

View service

Active Directory health check

Stale accounts, replication, DNS and permissions reviewed and cleaned up.

View service

Group Policy management

Group Policy designed, documented and tested before it reaches users.

View service