You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Rule Tuning] M365 Exchange Inbox Rule with Obfuscated Name: grok expects two backslashes, rule never fires #7271
Triple-quoted strings are passed through as-is, so the regex engine receives \\\\, which matches two literal backslashes. Exchange writes one backslash between the mailbox identity and the rule name, for example:
NAMPR03A011.PROD.OUTLOOK.COM/Microsoft Exchange Hosted Organizations/contoso.onmicrosoft.com/0b9c1c1e-1111-2222-3333-444455556666\Forward to archive
So Esql.inbox_rule_name is always null, the following rlike drops every row, and an inbox rule named only with symbols (for example ...) is never reported.
Repro against real New-InboxRule audit records (Elastic Cloud Serverless, current o365 integration):
FROM logs-o365.audit-*
| WHERE event.action == "New-InboxRule"
| GROK o365.audit.ObjectId """.*\\\\(?<Esql.inbox_rule_name>.*)$"""
| KEEP o365.audit.ObjectId, Esql.inbox_rule_name
returns null for Esql.inbox_rule_name on every row. With a single escaped backslash it returns the rule name correctly:
Activity