Skip to content

Instantly share code, notes, and snippets.

@rezamt
Created June 19, 2025 03:44
Show Gist options
  • Save rezamt/22224232238f5c42422c5063d08e6d63 to your computer and use it in GitHub Desktop.
Save rezamt/22224232238f5c42422c5063d08e6d63 to your computer and use it in GitHub Desktop.
Splunk Regex
| eval policy_result_pairs=mvzip('properties.appliedConditionalAccessPolicies{}.displayName', 'properties.appliedConditionalAccessPolicies{}.result', ":")
| mvexpand policy_result_pairs
| rex field=policy_result_pairs "^(?<policy_name>[^:]+):(?<policy_result>.+)$"
| search (policy_name="policy1" OR policy_name="policy2") AND policy_result="failure"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment