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.
Written by Ali Hassani, CISSP and C|CISO · 25+ years designing, securing and supporting business networks · Updated November 2026



Microsoft 365 Best Practices Library › Identity and sign-in › Account lockout policy
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.
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.
| Behavior | What Microsoft documents |
|---|---|
| Default threshold | 10 failed attempts in Azure Public tenants (3 in Azure US Government tenants) |
| Default duration | 60 seconds for the first lockout, longer after repeated lockouts; the rate of increase is not disclosed |
| Repeated identical wrong password | Not 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 locations | Counted separately, so an attacker elsewhere is less likely to lock out the genuine user at their usual location |
| After a lockout | The user can use self-service password reset; choosing “I forgot my password” resets the lockout duration |
| Administrator action | An administrator can unlock a cloud account without waiting |
| With pass-through authentication | Hash 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.
| Setting | What it does | Notes |
|---|---|---|
| Account lockout threshold | The number of wrong passwords that locks the account | 0 means accounts never lock. Very low values cause accidental lockouts. |
| Account lockout duration | How long the account stays locked | 0 means it stays locked until an administrator unlocks it, which is rarely a good choice. |
| Reset account lockout counter after | How long before the count of wrong attempts returns to zero | Must be less than or equal to the lockout duration. |
| Allow Administrator account lockout | Whether the built-in Administrator account can be locked | Available 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.
| Rule | Microsoft’s guidance | Example |
|---|---|---|
| Thresholds | The Microsoft Entra lockout threshold must be less than the AD DS threshold; set AD DS at least two or three times greater | Entra 10, Active Directory 20 |
| Durations | The Microsoft Entra lockout duration must be longer than the AD DS duration | Entra 120 seconds, Active Directory 1 minute |
| Units | Entra duration is in seconds; AD DS duration is in minutes | Convert 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
Step by step
Review and set the policy in six steps
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.
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.
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.
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.
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.
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 source | How it shows up | Fix |
|---|---|---|
| Phone or tablet mail app with an old password | Lockouts start right after a password change, at regular intervals | Update or remove the account on the device |
| Mapped drive or saved credential on another computer | Caller computer is one the user signed in to in the past | Clear saved credentials in Credential Manager |
| Scheduled task or service running as the user | Lockouts at fixed times; caller is a server | Move it to a proper service account |
| Disconnected remote desktop session | An old session keeps using the old password | Sign the session out |
| Wi-Fi or VPN profile with saved domain credentials | Lockouts when the device is in range of the office | Forget the network and reconnect |
| Password guessing from outside | Many accounts, attempts from unfamiliar addresses, in the cloud logs | Confirm MFA and legacy authentication blocking; consider a location policy |
| An application with the old password stored | Caller is an application server | Update 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
| Setting | Recommended approach | Why |
|---|---|---|
| Entra smart lockout threshold | Leave at the default of 10 unless you have a reason | Microsoft describes the defaults as the right mix of security and usability. |
| Entra smart lockout duration | Default 60 seconds; longer than the domain duration if you use pass-through authentication | Lets the cloud absorb attacks first. |
| Domain lockout threshold | Follow the current Microsoft security baseline; never below 5 | Very low values lock out genuine users. |
| Domain lockout duration | A short, fixed time; not “until an administrator unlocks” | Self-healing, and no route to a denial of service. |
| Reset counter after | Equal to or shorter than the duration | Required by the policy and simpler to explain. |
| Service accounts | Managed service accounts where possible; long random passwords; monitored | They cannot recover from a lockout by themselves. |
| Administrators | Separate admin accounts with MFA; consider a fine-grained policy | High-value accounts deserve their own rules. |
| MFA | Required for all cloud sign-ins | A 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.
| Measure | Where to get it | What good looks like |
|---|---|---|
| Lockouts per week | Event 4740 count; cloud error 50053 count | Low and stable |
| Repeat lockouts on the same account | Same sources | Near zero after investigation |
| Help-desk unlock requests | Your ticket system | Falling after self-service reset is in place |
| Failed sign-ins from unfamiliar locations | Entra sign-in logs | Present 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.
Licenses
Which plan gives you what
| Capability | License |
|---|---|
| Active Directory account lockout policy | Included with Windows Server Active Directory |
| Entra smart lockout with default values | Every Microsoft Entra tenant |
| Custom smart lockout values | Microsoft Entra ID P1 or higher |
| Custom banned password list; on-premises password protection agent | Microsoft Entra ID P1 or higher |
| Self-service password reset with writeback to Active Directory | Microsoft 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.
Next in the library
Related guides
Want a quick self-check first? Try the free Entra ID security assessment tool. For a formal written audit of Microsoft Entra ID, OC Security Audit, our related cybersecurity brand also led by Ali Hassani, does that work.

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.








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 serviceActive Directory health check
Stale accounts, replication, DNS and permissions reviewed and cleaned up.
View serviceGroup Policy management
Group Policy designed, documented and tested before it reaches users.
View service