Defender XDR
OAuth Application Abuse: End-to-End SecOps Investigation
Trigger a benign OAuth abuse simulation, then work the Defender XDR incident from triage through Security Copilot, threat analytics, advanced hunting and App Governance to remediation and the incident report.
Where it fits: lab 5 of 5
Investigate and respond with Defender XDR. Run incidents in the unified portal, hunt across products, build custom detections and work an attack from alert to report.
- Configure Unified Incident Management 60 min
- Advanced Cross-Product Threat Hunting 75 min
- Build Custom Detection Rules with Auto-Response 75 min
- Incident Response: Investigate a Simulated APT Attack 120 min
- OAuth Application Abuse: End-to-End SecOps Investigation 3 h
What this lab covers
This hands-on lab reproduces the analyst experience for one of the fastest-growing identity attacks: OAuth application abuse . Instead of stealing a password, the attacker convinces (or compels) a user or admin to grant an application delegated or application-level permissions in Microsoft Entra ID, then uses those permissions through the Microsoft Graph API to enumerate the tenant, read mail, add forwarding rules, and stage lateral movement. Because everything runs with a legitimate access token, traditional password-focused controls do not detect it. In this lab you drive a safe simulator that registers a lab OAuth application and reproduces the deterministic discovery stage of that attack - a burst of read-only Microsoft Graph calls - without ever touching mail, forwarding rules, or lateral movement. You then turn that deterministic Graph telemetry into a Defender XDR incident with a custom detection rule and walk the analyst end-to-end through the resulting incident in the Unified Security Operations Platform.
The enterprise scenario
A mid-size financial services firm runs a Security Operations Center (SOC) on the Unified Security Operations Platform. Late on a Friday evening the SOC receives a Defender XDR incident titled “Suspicious OAuth app used for collection activities using Graph API.” The alerts started with an anomalous token sign-in from a Tor exit node, followed by the registration of a new multi-tenant OAuth application, followed by a burst of Microsoft Graph calls listing users, groups, directory roles, and multifactor authentication (MFA) status. The tier-1 analyst has 45 minutes to decide whether this is a genuine attack, how much of the tenant has been enumerated, whether the application should be disabled, and which affected accounts need to be contacted. This lab reproduces that scenario end-to-end so you can rehearse the workflow and the analyst hand-offs before an incident like it lands in production.
What you will learn
- Why OAuth application abuse is an identity-centered attack path and how it differs from credential theft
- The three OAuth abuse patterns Microsoft tracks: malicious , compromised , and dormant applications
- The attack chain used in the simulation: initial access → app creation → discovery → collection → persistence → lateral movement
- How Defender XDR correlates OAuth alerts into a single incident and tags the incident with the “OAuth App Abuse” category
- Why the built-in OAuth detections are non-deterministic, and how to generate an incident deterministically with a custom detection rule on MicrosoftGraphActivityLogs
- How to read an incident from the Unified Security Operations Platform: title, summary, alerts, entities, MITRE ATT&CK techniques
- How to use Security Copilot to produce an incident summary an analyst can share with a stakeholder
- How to look up the underlying attack technique in Threat Analytics and pin its context to your investigation
Before you start
- Isolated lab tenant — a Microsoft 365 developer subscription or an Entra ID tenant dedicated to security exercises. Do not run the simulator in a production tenant.
- Global Administrator or Cloud Application Administrator role in the lab tenant — required to register an application and grant admin consent for the simulated permissions.
- Microsoft 365 E5 or Microsoft 365 E5 Security license attached to the tenant (trial acceptable) — provides Defender XDR, App governance, and Advanced Hunting.
- Microsoft Sentinel workspace connected to the Unified Security Operations Platform — onboard the workspace to the Defender portal so incidents appear at security.microsoft.com .
- Diagnostic setting forwarding MicrosoftGraphActivityLogs from Entra ID to the Log Analytics workspace, so the Advanced Hunting step in this lab returns data.
- Security Copilot capacity attached to the tenant (recommended) — steps 2 and 10 use Copilot for summary and report generation. Without Copilot you can still complete the lab, just skip the AI-assisted narration.
- PowerShell 7.2 or newer and the modules Microsoft.Graph.Applications , Microsoft.Graph.Identity.DirectoryManagement , and Microsoft.Graph.Users (the companion script installs them on demand).
- Microsoft Defender for Cloud Apps enabled — App governance appears in the Defender portal only when Defender for Cloud Apps is licensed and active.
What the guide covers
- Attack Chain at a Glance
- Step 0 — Trigger the Simulation
- Step 1 — Look at the New Incident
- Step 2 — Understand the Incident with Security Copilot
- Step 3 — Understand the Technique via Threat Analytics
- Step 4 — Follow the Attack Story
- Step 5 — Track the App with Advanced Hunting
- Step 6 — Inspect Permissions in App Governance
- Step 7 — Disable the Application (Remediation)
- Step 8 — Coordinate the Impacted-User Response
- Step 9 — Close the Incident
- Step 10 — Generate the Incident Report
- Detections that Support This Simulation
- Documentation Resources
Related labs
Investigate App-Based Attacks & Supply Chain Threats
Investigate OAuth supply chain attacks, detect compromised app indicators, contain and remediate app-based breaches, build detection rules for supply chain threats, harden tenant defences, and create incident response playbooks.
Investigate Risky OAuth Apps & Service Accounts
Audit OAuth app permissions, identify over-privileged applications, create policies for risky consent grants, investigate suspicious app behaviour, revoke access from compromised apps, and remediate compromised service accounts.