type.inbound
and any([body.links, body.current_thread.links],
any(.,
(
.href_url.domain.domain in (
'login.microsoftonline.com',
'login.microsoft.com'
)
or strings.icontains(.href_url.query_params,
"login.microsoftonline.com",
'login.microsoft.com'
)
)
and (
strings.ilike(.href_url.query_params,
'*offline_access*',
'*.readwrite*',
'*.read*',
'*ctx=*',
'*prompt=none*'
)
or (
(
strings.icontains(.href_url.path, '/common/reprocess')
or strings.icontains(.href_url.query_params,
"/common/reprocess"
)
)
and strings.icontains(.href_url.query_params, 'ctx=')
and strings.icontains(.href_url.query_params, 'sessionId=')
)
)
)
)
Playground
Test against your own EMLs or sample data.