Loading...
Loading...
M365 email and collaboration security telemetry for detection engineering — Exchange Online mail flow (transport rules, journaling, DLP), mailbox delegation and forwarding rules, OAuth app permissions on mailboxes, SharePoint/OneDrive external sharing, Teams guest access, Purview Unified Audit Log (UAL) event types, MailItemsAccessed semantics, and BEC/phishing detection patterns. Use when authoring detections targeting email-based attacks, business email compromise, data exfiltration via collaboration tools, or insider threat indicators.
npx skill4agent add opentidehq/skills email-and-collaborationScope: This skill covers Microsoft 365 (Exchange Online, SharePoint, OneDrive, Teams). Google Workspace, Slack, and other collaboration platforms are not covered. SIEM table names vary by platform — consult the relevant platform skill for ingestion specifics.
Sender → Exchange Online Transport Pipeline
→ Transport rules (mail flow rules) evaluated
→ DLP policies evaluated
→ Connector routing (on-prem, partner, internet)
→ Recipient mailbox delivery
→ Post-delivery actions (ZAP, Safe Links rewrite)| Concept | Detail | Detection signal |
|---|---|---|
| Transport rules | Admin-created rules that modify, redirect, or block mail | New transport rule creation = potential BEC infrastructure. |
| Journal rules | Copy all mail to a journal mailbox | New journal rule = potential exfiltration. |
| Connectors | Route mail to/from external systems | New outbound connector = potential mail redirection. |
| ZAP (Zero-hour Auto Purge) | Retroactively removes malicious messages post-delivery | |
| Safe Links | URL rewriting for click-time protection | |
| Mechanism | How it works | Detection | Persistence level |
|---|---|---|---|
| Inbox rules | User-created rule forwarding/redirecting mail | | Per-mailbox, survives password change |
| SMTP forwarding | | | Admin-level, survives password change |
| Transport rule forwarding | Org-wide rule redirecting mail | | Org-wide, admin-only |
| Power Automate flow | Automated flow forwarding mail | Flow creation events in UAL. | Per-user, survives password change |
| Delegate access | Another user granted access to mailbox | | Admin-level |
ForwardToRedirectToDeleteMessageForwardingSmtpAddressFullAccessSendAsSendOnBehalf| Permission | What it grants | Risk |
|---|---|---|
| Read all mail in all mailboxes | Full email exfiltration |
| Read/write all mail | Email manipulation + exfiltration |
| Send mail as any user | BEC impersonation |
| Modify mailbox settings | Create forwarding rules silently |
AuditLogsOperationNameConsent to applicationTargetResources[0].modifiedPropertiesMailItemsAccessed| Field | Detail | Detection use |
|---|---|---|
| | |
| Application identifier | |
| Number of items accessed | High count in short window = bulk access |
| Session correlation | Correlate with sign-in events |
SyncOperationCountMailItemsAccessed| Sharing level | Risk | Detection signal |
|---|---|---|
| Anyone link | Highest — no authentication required | |
| Specific people (external) | Medium — requires authentication | |
| Organisation-wide | Low (internal) | |
| Operation | UAL event | Detection use |
|---|---|---|
| File downloaded | | Bulk download = exfiltration |
| File shared externally | | Data leak |
| Sharing link created | | Anyone-accessible link |
| Site permission changed | | Privilege escalation |
| Sensitivity label removed | | DLP bypass |
| File synced | | Bulk sync to unmanaged device |
| Operation | UAL event | Detection use |
|---|---|---|
| Guest added to team | | External access |
| External user messaged | | Data leak via chat |
| App installed in team | | Malicious app / OAuth abuse |
| Meeting recording accessed | | Sensitive content access |
| Channel created | | Shadow IT / unauthorised collaboration |
| Connector added | | Webhook-based data exfiltration |
| Aspect | Detail |
|---|---|
| Retention | 180 days (E5/Audit Premium) or 90 days (standard) |
| Latency | 60-90 minutes typical; can be up to 24 hours for some workloads |
| Search | |
| SIEM ingestion | Via diagnostic settings, Office 365 Management Activity API, or platform-specific connectors. Consult your platform skill for table names. |
| RecordType | Service | Key operations |
|---|---|---|
| Exchange | Mail access, send, delete |
| Exchange | Mailbox config, transport rules |
| SharePoint/OneDrive | File operations, sharing |
| Entra ID | Sign-in, directory changes |
| Teams | Messaging, meetings, apps |
| Power BI | Report access, sharing |
| Purview | DLP, retention, eDiscovery |
1. Credential phishing (AiTM) → successful sign-in from anomalous location
2. Inbox rule created: forward/redirect to external address, or delete messages matching keywords
3. Attacker monitors email for financial transactions
4. Attacker sends fraudulent payment instructions from compromised account1. Phishing email with OAuth consent link
2. User grants permissions to malicious app
3. App accesses mail/files via Graph API without further authentication
4. Access persists even after password changeMail.ReadFiles.ReadWrite.Allentra-id1. User downloads large volumes of files from SharePoint/OneDrive
2. User shares files externally via anonymous links
3. User forwards email to personal accountFileDownloadedAnonymousLinkCreatedSet-Mailbox ForwardingSmtpAddress| M365 operation | UAL operation name | API source | Licence |
|---|---|---|---|
| Email delivery | | Office 365 Management Activity API | E3/E5 |
| Email URL clicks | | Defender for Office 365 API | Defender P1/P2 |
| Email attachments | (embedded in delivery events) | Defender for Office 365 API | Defender P1/P2 |
| Post-delivery actions (ZAP) | | Defender for Office 365 API | Defender P1/P2 |
| Inbox rule changes | | Office 365 Management Activity API | E3/E5 |
| Mailbox config changes | | Office 365 Management Activity API | E3/E5 |
| SharePoint file operations | | Office 365 Management Activity API | E3/E5 |
| Teams operations | | Office 365 Management Activity API | E3/E5 |
| MailItemsAccessed | | Office 365 Management Activity API | E5 / Audit Premium |
Map these operations to your SIEM's tables/indexes. Consult the relevant platform skill (,microsoft-sentinel, etc.) for ingestion specifics.splunk-spl-processing
MailAccessTypeClientInfoString