Analyzing Office 365 Audit Logs for Compromise
SkillMonitoring & opsLets your agent read Office 365 audit logs to spot signs of an account compromise.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Analyzing Office 365 Audit Logs for Compromise skill
About this capability
Parse Office 365 Unified Audit Logs via Microsoft Graph API to detect
What this skill tells your AI
The instructions your AI receives, as published by mukul975/anthropic-cybersecurity-skills in skills/analyzing-office365-audit-logs-for-compromise/SKILL.md and read by ahel’s review.
Overview
Business Email Compromise (BEC) attacks often leave traces in Office 365 audit logs: suspicious inbox rule creation, email forwarding to external addresses, mailbox delegation changes, and unauthorized OAuth application consent grants. This skill uses the Microsoft Graph API to query the Unified Audit Log, enumerate inbox rules across mailboxes, detect forwarding configurations, and identify compromised account indicators.
When to Use
- When investigating security incidents that require analyzing office365 audit logs for compromise
- When building detection rules or threat hunting queries for this domain
- When SOC analysts need structured procedures for this analysis type
- When validating security monitoring coverage for related attack techniques
Prerequisites
- Azure AD app registration with
AuditLog.Read.All,MailboxSettings.Read,Mail.Read(application permissions) - Python 3.9+ with
msal,requests - Client secret or certificate for authentication
- Global Reader or Security Reader role
Steps
- Authenticate to Microsoft Graph using MSAL client credentials flow
- Query Unified Audit Log for suspicious operations (Set-Mailbox, New-InboxRule)
- Enumerate inbox rules across mailboxes and flag forwarding rules
- Detect mailbox delegation changes (Add-MailboxPermission)
- Identify OAuth consent grants to suspicious applications
- Check for suspicious sign-in patterns from audit logs
- Generate compromise indicator report with timeline
Expected Output
- JSON report listing forwarding rules, delegation changes, OAuth grants, and suspicious audit events with risk scores
- Timeline of compromise indicators with affected mailboxes
Signals
- GitHub stars
- 33k
- Forks
- 4k
- Last commit
- Aug 2026
ahel recommends instead
Advanced
- Catalog kind
- skill
- Gateway key
analyzing-office365-audit-logs-for-compromise-mukul975- Source
- github.com/mukul975/anthropic-cybersecurity-skills