You can use the sub-search method where the sub-search would detect password spray and pass the attempted source_ip and username combination to the main search which detects the successful logins. index = auth0 <successful login condition here>
[
search index = auth0 <login attempts condition here>
| eventstats dc(data.user_name) as unique_accounts by data.ip
| where unique_accounts>10
| table data.ip,data.user_name
]
| stats count by data.user_name,data.ip,<result,_time>
#NOTE: <...> variable block
... View more