Modern organizations don’t just live in AWS or Azure — they live in Microsoft 365, Salesforce, Okta, and Slack. SaaS platforms are where attackers find the data and where they establish persistence. Detection requires pulling logs from all of them.
The SaaS Detection Challenge
On-prem detection: install Sysmon on every host, ingest to SIEM, done. SaaS detection: every vendor has a different API, different log format, different retention policy, different pricing model for log access, and different event taxonomy. There is no standard.
The practical approach:
- Identify which SaaS platforms your organization uses for sensitive data or authentication
- Enable audit logging in each (not always on by default)
- Build SIEM connectors (most vendors provide Splunk/Sentinel/Elastic integrations)
- Write detections starting with identity events (authentication, admin changes)
Microsoft 365 Unified Audit Log
The UAL covers all M365 services in one log stream. Query via PowerShell or the Compliance Center UI:
# Retrieve audit log for a user suspected of BEC
Search-UnifiedAuditLog -StartDate "2026-05-10" -EndDate "2026-05-20" `
-UserIds "alice@corp.com" `
-Operations "New-InboxRule","Set-InboxRule","Add-MailboxPermission","Set-Mailbox" `
-ResultSize 1000 | Select-Object CreationDate, Operations, UserIds, AuditData
Detection Pattern 1: Inbox Rule Exfiltration (BEC)
title: Exchange Online — Suspicious Inbox Rule to External Address
logsource:
product: m365
service: exchange
detection:
selection:
Operation:
- "New-InboxRule"
- "Set-InboxRule"
selection_external_forward:
Parameters|contains:
- "ForwardTo"
- "ForwardAsAttachmentTo"
- "RedirectTo"
selection_external_domain:
AuditData|contains: "@gmail.com" # adapt to known-external domains
condition: selection and selection_external_forward
falsepositives:
- Legitimate out-of-office forwarding to personal email (document in baseline)
level: high
Detection Pattern 2: OAuth App Consent Grant
title: M365 OAuth Application — High-Permission Consent Granted
logsource:
product: azure
service: auditlog
detection:
selection:
ActivityDisplayName: "Consent to application"
selection_high_perm:
ModifiedProperties.NewValue|contains:
- "Mail.Read"
- "Mail.Send"
- "Files.ReadWrite.All"
- "Directory.ReadWrite.All"
condition: selection and selection_high_perm
falsepositives:
- Legitimate business app integrated with M365 (must be reviewed case by case)
level: high
Hunting complement: Query all OAuth apps granted Mail.Read or Files.ReadWrite.All in the past 90 days. Identify apps not in your approved application catalog.
Okta System Log: The SSO Chokepoint
Okta System Log events critical for detection:
| Event | Signal |
|---|---|
user.authentication.auth_via_mfa with factor.type=SMS and outcome.result=FAILURE | MFA OTP failure (possible OTP phishing or SIM swap) |
user.account.update_password | Password changed (may follow account takeover) |
policy.rule.update — MFA policy | MFA requirement weakened |
application.lifecycle.update — new app added | New SSO app configured (possible persistence) |
user.session.impersonation.initiate | Admin impersonating a user |
security.threat.detected — anomalous device | Okta ThreatInsight flagged suspicious login |
title: Okta — Admin Role Granted to User
logsource:
product: okta
service: system_log
detection:
selection:
eventType: "group.user_membership.add"
target.displayName|contains: "Okta Admin"
condition: selection
level: critical
Correlating Across SaaS Platforms
The most valuable detections connect events across platforms:
OKTA LOGIN (success, new IP) → EXCHANGE INBOX RULE CREATED → SHAREPOINT DATA DOWNLOAD
│ │ │
[Okta System Log] [M365 Unified Audit Log] [M365 UAL or SharePoint Logs]
This is a classic BEC sequence:
- Attacker logs in via Okta SSO from a new IP (Okta log)
- Creates inbox forwarding rule (Exchange UAL)
- Downloads files from SharePoint (SharePoint UAL)
Each event alone might be a tuning problem. Together, they’re a high-confidence BEC. SIEM correlation rules should look for this sequence within a 1-hour window per user.
SaaS Log Maturity Checklist
Before writing SaaS detection rules, verify each:
□ Audit logging enabled and confirmed flowing to SIEM
□ Log retention period known and documented (90 days? 1 year?)
□ Admin activity events confirmed (user creation, role grants, policy changes)
□ Authentication events confirmed (login success/failure, MFA outcomes)
□ Data access events confirmed (file access, email access) — often separate/opt-in
□ SIEM field mapping validated (event names, usernames, timestamps in correct fields)
□ Alert for logging gaps (if Okta events stop flowing for > 5 minutes, alert immediately)
M365 Unified Audit Log— Microsoft
Okta System Log API— Okta