let FailThreshold = 10;
let TimeWindow = 15m;
SigninLogs
| where TimeGenerated > ago(1d)
| summarize FailCount = countif(ResultType != 0), SuccessCount = countif(ResultType == 0), IPAddresses = make_set(IPAddress) by UserPrincipalName, bin(TimeGenerated, TimeWindow)
| where FailCount >= FailThreshold and SuccessCount >= 1
| sort by FailCount desc