entra_id_expired_refresh_token_use
Description
Identify Entra ID OAuth refresh tokens are attempted to be used but have expired. This could be because the token hasn't been used for 90 days or it has been revoked
Query · yara_l
events:
$login.metadata.event_type = "USER_LOGIN"
$login.metadata.product_name = "Azure Activity"
$login.metadata.product_event_type = "Sign-in activity"
$login.metadata.vendor_name = "Microsoft"
$login.security_result.action = "BLOCK"
//$login.metadata.description = "Fresh auth token is needed. Have the user re-sign using fresh credentials."
$login.security_result.action_details = "50173"
$login.principal.user.userid = $userid
match:
$userid over 15m
outcome:
$risk_score = 15
$event_count = count_distinct($login.metadata.id)
$principal_ip = array_distinct($login.principal.ip)
$user_agent = array_distinct($login.network.http.user_agent)
$target_application = array_distinct($login.target.application)
condition:
$login