Analytics Rules


Queries designed (or used) as the body of a Sentinel Analytics Rule — they're written to produce discrete detection events on a schedule rather than to be run interactively.

 KQL Library / Analytics Rules

Analytics Rules

Queries designed (or used) as the body of a Sentinel Analytics Rule — they're written to produce discrete detection events on a schedule rather than to be run interactively.

← All KQL categories

Standalone

Failed Logins

Brute-force / failed-login threshold rules.

  • Failed Login Attempts failed-login-attempts.kql

    3+ failed sign-ins (`ResultType == 50126` — invalid username or password) for the same UPN within a 2-minute window. Written for a demo that pairs with a Logic App to auto-disable or lock the account.

Password Spray

Detections for password-spray patterns against Entra ID sign-in logs (`SigninLogs`). Both queries are heuristic — tune the thresholds to your environment before promoting to an Analytics Rule.