1. Resources
  2. Detection rules
  3. Password Guessing Against One Account

Password Guessing Against One Account detection rules

An attacker tries many passwords for one chosen Microsoft Entra account, often from changing addresses. Smart lockout slows the attempts down but does not end them. The sign-in log shows a run of failed sign-ins for one user.

Platform
Microsoft Entra ID
Severity
Medium
Log source
Microsoft Entra ID sign-in logs
Last updated
Rule formats
Sigmaand queries for: SplunkMicrosoft Sentinel
What an attacker needs
The user principal name of the target, which is usually the email address, and a sign-in endpoint that accepts a password.
Impact
A valid password for an account the attacker picked on purpose, often a privileged one, which is a session as the user where multifactor authentication is missing.
Response
If a sign-in succeeded or reached the multifactor step, reset the password, revoke the sessions of the user and review the authentication methods on the account.
Mitigation
Require multifactor authentication for every user and block legacy authentication, so that a guessed password is not enough to sign in.

How the attack works

Password spraying goes after any account that happens to have a weak password. Password guessing goes after one account the attacker has chosen: an administrator, an executive, an account whose name appeared in a breach. The attacker tries one password after another for that user, built from common passwords and from what is known about the person. Any internet-facing sign-in of the tenant can be used, and protocols that accept a password without a second factor are preferred.

Each wrong guess is a failed sign-in with error 50126 (invalid username or password). Microsoft Entra smart lockout counts the failures per account and, by default, locks the account for one minute after 10 failed attempts and for longer when the failures continue. While the account is locked, sign-ins are refused with error 50053. Smart lockout keeps separate counters for familiar and unfamiliar locations, so that the attacker is locked out while the real user can usually keep working. It slows guessing down to a few attempts per lockout period, but an attacker who comes back after every lockout can continue for days.

A single failed sign-in means nothing, and Microsoft expects some 50126 errors in every tenant. The signal is the count for one user. The rule on this page counts failed sign-ins with error 50126 or 50053 per user, whatever address they come from, so that guessing spread over many addresses is counted as well. Its values are starting points to tune.

What an attacker needs

  • The user principal name of the target, which is usually the email address.
  • A sign-in endpoint that accepts a password. Accounts without multifactor authentication, and protocols that cannot ask for it, turn one correct guess into access.

Impact

A valid password for an account the attacker picked on purpose, often a privileged one. Without multifactor authentication that is a session as the user. With it the attacker holds the first factor and moves on to ways around the second, such as MFA fatigue. Smart lockout tries to spare the real user, but Microsoft does not guarantee it, so a sustained attack can also keep the user out of the account.

Detection rules

Repeated Failed Password Sign-Ins for One User

Counts, per user, the Microsoft Entra sign-ins that failed with error 50126 (invalid username or password) or 50053 (account locked by smart lockout, or sign-in blocked because of the IP address). Twenty or more such failures for one user within one hour are more than typing mistakes: either someone is guessing the password, or a device or application keeps presenting an old one. The count ignores the source address on purpose, so guessing that is spread over many addresses is counted too. The count and the window are starting points to tune against your own baseline; use a lower count for privileged accounts. The rule reads the interactive sign-in log; run the same count over the non-interactive user sign-in log (AADNonInteractiveUserSignInLogs in Sentinel). Failed sign-ins of a federated domain are recorded by the identity provider and do not appear in the Microsoft Entra sign-in log.

Fires when one UserPrincipalName has at least 20 matching events within 1 hour.

Threshold ruleLevelLowStatusExperimentalLog sourceMicrosoft Entra ID sign-in logs
title: Sign-In Failed With a Wrong Password or a Locked Account (Guessing Base Event)
id: 090c4c8d-cb95-4556-bbab-706b7a36ea8e
name: entra_failed_password_sign_in_one_user
status: experimental
description: >-
  Base event of the threshold rule in this file. A Microsoft Entra sign-in
  that failed with error 50126 (InvalidUserNameOrPassword, invalid username or
  password) or 50053 (the account is locked after repeated wrong sign-in
  attempts, or the request came from an IP address with malicious activity).
logsource:
  product: azure
  service: signinlogs
detection:
  selection:
    ResultType:  # string column
      - '50126'
      - '50053'
  condition: selection
level: low
---
title: Repeated Failed Password Sign-Ins for One User
id: d194acf9-06c3-49fd-a5e4-d2fbfa11f2e9
status: experimental
description: >-
  Counts, per user, the Microsoft Entra sign-ins that failed with error 50126
  (invalid username or password) or 50053 (account locked by smart lockout, or
  sign-in blocked because of the IP address). Twenty or more such failures for
  one user within one hour are more than typing mistakes: either someone is
  guessing the password, or a device or application keeps presenting an old
  one. The count ignores the source address on purpose, so guessing that is
  spread over many addresses is counted too. The count and the window are
  starting points to tune against your own baseline; use a lower count for
  privileged accounts. The rule reads the interactive sign-in log; run the
  same count over the non-interactive user sign-in log
  (AADNonInteractiveUserSignInLogs in Sentinel). Failed sign-ins of a
  federated domain are recorded by the identity provider and do not appear in
  the Microsoft Entra sign-in log.
references:
  - https://learn.microsoft.com/en-us/entra/identity-platform/reference-error-codes
  - https://learn.microsoft.com/en-us/entra/identity/authentication/howto-password-smart-lockout
  - https://learn.microsoft.com/en-us/entra/architecture/security-operations-user-accounts
  - https://attack.mitre.org/techniques/T1110/001/
author: Forestall
date: 2026-11-15
tags:
  - attack.credential-access
  - attack.t1110.001
correlation:
  type: event_count
  rules:
    - entra_failed_password_sign_in_one_user
  group-by:
    - UserPrincipalName
  timespan: 1h
  condition:
    gte: 20
falsepositives:
  - Phones, mail clients, mapped drives and scripts that keep presenting an old password after a password change. They retry at fixed intervals from the user's usual address and are the most common cause. Update the saved password instead of excluding the user.
  - Service and shared accounts used by an application with a wrong stored password. Fix the configuration; the failures stop.
  - The values of 20 failures and one hour are starting points, not tested limits. Measure what a normal user produces after a password change in your tenant and adjust both.
level: low

False positives

  • Phones, mail clients, mapped drives and scripts that keep presenting an old password after a password change. They retry at fixed intervals from the user's usual address and are the most common cause. Update the saved password instead of excluding the user.
  • Service and shared accounts used by an application with a wrong stored password. Fix the configuration; the failures stop.
  • The values of 20 failures and one hour are starting points, not tested limits. Measure what a normal user produces after a password change in your tenant and adjust both.

Detection logic

Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.

Successful sign-in after a run of wrong passwords for the same account

Detection hypothesisSequence of eventsNeeds a baseline

Wrong passwords for one account are the attempt, a success after them is the result. Microsoft's guidance for privileged accounts treats a bad password threshold as high risk, and its password spray playbook asks for the successful and the MFA-interrupted sign-ins of the attacked accounts. A run of failures followed by a success or an MFA interruption for the same account shows the guess that worked.

  1. Sign-in log: a user for whom the threshold rule on this page fired (failed sign-ins with ResultType 50126 or 50053).
  2. Interactive and non-interactive sign-in logs, the following 2 hours: sign-ins of the same UserPrincipalName with ResultType 0, or with 50074 or 500121, where the password was accepted and MFA was required or failed.
  3. Compare the IPAddress and AutonomousSystemNumber of that sign-in with those of the failures and with the user's usual addresses.
  4. Alert when the success or interruption comes from the network of the failures or from a network the user has not used.

LimitsA user who mistypes a password several times and then gets it right from the usual device produces the same sequence, which is why the network of the success carries the signal. The 2 hours are a starting point.

Triage

  • Identify the account. Failed sign-ins for a privileged role holder, an executive or an emergency access account deserve attention at a much lower count than for an ordinary user.
  • Read the sources of the failures. Many addresses, hosting providers or countries the user never signs in from point to an attack. The user's own device and usual location point to a saved password that is out of date.
  • Check the client application and the user agent. Legacy protocols, and one user agent arriving from many addresses, point to a tool.
  • Look at the timing. Attempts that resume shortly after every lockout period indicate automation that paces itself against smart lockout.
  • Search for a successful sign-in (result 0) for the same user from one of those sources, and for sign-ins that passed the password and stopped at the second factor, such as error 50074 or 500121. Either means the password is known.
  • Ask the user whether they changed their password recently and which devices and applications still hold the old one.

Response

Once the attack is confirmed:

  1. If a sign-in succeeded or reached the multifactor step, treat the password as known. Reset it, revoke the sessions of the user and review the authentication methods registered on the account for any the user does not recognize.
  2. Review what the account did since the first successful sign-in from the attacker, including mailbox rules, application consent, role activations and changes in the directory, and undo what was not the user.
  3. Block the confirmed source addresses with a Conditional Access policy for a named location, and expect the attacker to change addresses.
  4. Mark the user as compromised in Microsoft Entra ID Protection where it is licensed, so that risk policies apply.
  5. Make sure multifactor authentication is enforced for the account before it is used again, and move privileged accounts to phishing-resistant methods.
  6. If nothing succeeded but the attempts continue against a high-value account, give the account a long random password and keep the threshold rule on a lower count for that user.

Mitigation

  • Require multifactor authentication for every user, with phishing-resistant methods for administrators, so that a guessed password is not enough to sign in.
  • Block legacy authentication with Conditional Access. Those protocols cannot be challenged for a second factor and are the usual target.
  • Use Microsoft Entra Password Protection (the global and custom banned password lists) to keep guessable passwords out of the tenant.
  • Keep smart lockout enabled and review its threshold and duration. With pass-through authentication, keep the Microsoft Entra lockout threshold below the Active Directory threshold so that the cloud stops the attempts before the on-premises account locks.
  • With Microsoft Entra ID P2, apply sign-in risk and user risk policies so that risky sign-ins are challenged or blocked automatically.

Frequently asked questions

Does smart lockout stop password guessing against a Microsoft Entra account?

It slows it down. By default smart lockout locks an account for one minute after 10 failed attempts, and for longer when the failures continue, and it refuses sign-ins with error 50053 while the lock lasts. The attacker can carry on after each lockout, so over days many passwords can still be tried. Multifactor authentication is what makes a correct guess insufficient.

Which sign-in error codes show password guessing in Microsoft Entra ID?

Error 50126 means invalid username or password and is written for each wrong guess. Error 50053 means the account is locked after repeated attempts, or the request came from an IP address with malicious activity. Microsoft notes that some 50126 errors are normal because users make mistakes, so the signal is many of them for one user in a short time.

Will the real user be locked out while an attacker guesses their password?

Smart lockout keeps separate lockout counters for familiar and unfamiliar locations, so an attacker at an unfamiliar location can be locked out while the user continues from a familiar one. Microsoft states that this does not guarantee a genuine user is never locked out. A locked user can use self-service password reset, and an administrator can unlock the account.

Why are failed sign-ins of a federated domain missing from the Microsoft Entra sign-in log?

With federated authentication the password is checked by the identity provider, for example AD FS. Microsoft's password spray investigation guidance says that successful sign-ins are then stored in Microsoft Entra ID and failed sign-ins in the identity provider. The rule on this page cannot see guessing against federated accounts, so the identity provider's own logs have to be monitored.

References

We respect your privacy

We use cookies to keep this site secure and working properly. With your permission, we also use optional cookies to understand usage and improve the experience. Cookie Policy

You can change your choice at any time.