Skip to content
LessIT

Defender for Cloud Apps

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.

Intermediate 100 min 14 steps

Where it fits: lab 3 of 6

Discover and control cloud apps with Defender for Cloud Apps. Find shadow IT and AI apps, connect SaaS apps, control sessions, investigate risky OAuth apps and apply cloud DLP.

  1. Set Up Cloud Discovery & Shadow IT Analysis 75 min
  2. Deploy App Connectors & Session Controls 90 min
  3. Investigate Risky OAuth Apps & Service Accounts 100 min
  4. AI App Discovery and Governance 120 min
  5. Implement Cloud DLP Across SaaS Applications 2.5 h
  6. MDA Cloud App Discovery Dashboard 3 h

What this lab covers

OAuth applications are the silent attack surface of modern enterprises. Every time a user clicks “Allow” on a consent prompt, they may be granting a third-party application access to corporate data in Exchange, SharePoint, OneDrive, or Teams. Illicit consent grants and overprivileged OAuth apps are increasingly exploited in supply-chain attacks, credential harvesting, and data exfiltration campaigns. Defender for Cloud Apps provides a comprehensive inventory of all OAuth apps connected to your tenant, their permissions, publisher verification status, and data access patterns.

The enterprise scenario

A security operations team discovers that a marketing survey tool granted itself Mail.ReadWrite and Files.ReadWrite.All permissions through a user consent flow. The app, from an unverified publisher, has been accessing 200+ mailboxes and downloaded 8 GB of SharePoint data overnight. Simultaneously, three service accounts with application-level permissions show login activity from unexpected IP addresses. The team must identify all risky OAuth apps, revoke unauthorized access, create preventative policies, and investigate the extent of data exposure.

What you will learn

  • Navigate the OAuth apps dashboard and understand the app inventory
  • Identify overprivileged apps with high-risk permission scopes
  • Assess app risk using publisher verification and community usage
  • Investigate app data access patterns and anomalous behaviour
  • Create OAuth app policies for automatic detection of risky consent
  • Configure alert policies for unusual app behaviour
  • Revoke app permissions and ban malicious applications
  • Investigate compromised service accounts via activity logs

Before you start

  • Licensing: Microsoft Defender for Cloud Apps (standalone or via Microsoft 365 E5)
  • Portal Access: Security Administrator or Cloud App Security Administrator role
  • Entra ID: Application Administrator role for managing app registrations and consent settings
  • Microsoft 365 connector: Connected and operational (from Lab 01 )
  • App connectors: Configured (from Lab 02 )
  • Test OAuth apps: At least 2–3 OAuth apps consented in your tenant for investigation practice

The 14 steps

  1. Navigate the OAuth Apps Dashboard
  2. Identify Overprivileged Applications
  3. Assess Publisher Verification and Risk
  4. Investigate App Data Access Patterns
  5. Create OAuth App Policies for Risky Consent
  6. Configure Anomaly Detection for App Behaviour
  7. Revoke App Permissions and Ban Malicious Apps
  8. Investigate Compromised Service Accounts
  9. Remediate Compromised Credentials
  10. Configure User Consent Settings
  11. Set Up Admin Consent Workflow
  12. Build App Governance Policies for Compliance
  13. Integrate with Defender XDR Incidents
  14. Generate Executive Risk Reports