Defender for Cloud Apps
Cloud discovery · app catalog · connected apps · Conditional Access app control · access and session policies · OAuth app policies
By the tools4free.dev team · Last reviewed November 13, 2026
Practice questions for this topic →
Cloud discovery and Shadow IT
- Cloud discovery analyzes traffic logs against the catalog of over 31,000 cloud apps, scored on more than 90 risk factors. By default it can't discover apps that aren't in the catalog. Add a custom app for line-of-business apps.
- Discovery data is analyzed and updated four times a day.
- Portal path: Cloud apps > Cloud discovery. Use the Discovered apps tab and filters (for example Compliance risk factor, Risk score) to find risky apps, then use the bulk action to unsanction them.
- Discovered resources shows IaaS and PaaS resources. Discovered subdomains and resources need firewall or proxy logs with target URL data.
- Generate a report with Actions > Generate Cloud Discovery executive report.
| Source | Report type | Notes |
|---|---|---|
| Manual upload of firewall or proxy logs | Snapshot report | Ad-hoc view. Snapshot data doesn't trigger app discovery policy alerts. |
| Defender for Endpoint integration | Continuous | Toggle Microsoft Defender for Cloud Apps under Settings > Endpoints > General > Advanced features. Data can take up to two hours to appear. |
| Log collector (Syslog or FTP) | Continuous | Handles up to 50 GB of logs per hour. Needs 250 GB disk, 2 cores, 4 GB RAM. Alert if no data for 48 hours. |
| Secure web gateway (Zscaler, iboss, Corrata, Menlo Security) | Continuous | Integration also enables blocking of unsanctioned apps. |
| Cloud discovery API | Continuous | Automates log upload and block scripts. |
- Create custom continuous reports under Settings > Cloud Apps > Cloud Discovery > Continuous report. Filters: user groups, IP address tags or ranges. The global report doesn't include Defender for Endpoint data.
- Exclude noisy users, groups, IPs or devices under Exclude entities. Exclusions apply to new data only, and only to the Global report stream.
- Deleting cloud discovery data is irreversible and removes all of it.
Cloud app catalog, risk score and governing apps
- The total score of an app is a weighted average of four categories: General, Security, Compliance and Legal. Each property scores 0 to 10, and true/false values score 10 or 0.
- By default all parameters have equal weight. Change weights under Settings > Cloud Apps > Cloud Discovery > Score metrics (Ignored, Low, Medium, High, Very High).
- To change the score of one app without changing the weighting, use Override app score from the three-dot menu and add an app note.
- Request score update (catalog) and Suggest new app (Discovered apps > Actions) send a request to Microsoft's analysts.
- Custom apps need their domains (or IP addresses if the log has no URL data) and are tagged Custom app.
| Action | Effect |
|---|---|
| Sanctioned | Marked as approved for use. |
| Unsanctioned | Doesn't block by itself. Makes monitoring easier. Blocked automatically when Defender for Endpoint is used, or through Zscaler NSS, iboss, Corrata, Menlo or Open Systems. |
| Block script | Actions > Generate block script for a supported on-premises appliance. No traffic redirection to a proxy needed. |
| Manage app with Microsoft Entra ID | From a discovered app that's in the Entra gallery, apply single sign-on. |
If a manual sanction/unsanction conflicts with a discovery policy governance action, the last operation applied wins. Blocking through Defender for Endpoint needs Cloud Protection, Network Protection and, for non-Microsoft browsers, the Defender Browser Protection add-on. Some Microsoft services can't be blocked.
Connected apps (API connectors)
- Add under Cloud Apps > Connected apps > Connect an app or Add a new connector. Connectors use the app provider's APIs, over HTTPS.
- API connection can give account information, audit trail, account governance (suspend users, revoke passwords), app permissions and their governance (remove tokens), data scan and data governance.
- Data scan runs periodically (every 12 hours) and in real time when a change is detected.
- Multiple instances of the same app are supported for API-connected apps only, and not for Microsoft 365 and Azure.
- Disable with Disable App connector. This can't be used for Conditional Access app control apps and security configuration apps.
- Governance actions include apply or remove a sensitivity label, remove external users, user quarantine (self-service) and admin quarantine (admin approves).
Retirements on the pages: File policies retire January 6, 2027 (migrate to Microsoft Purview DLP or auto-labeling). The Files page was deprecated September 1, 2024.
Conditional Access app control and app-enforced restrictions
| Application-enforced restrictions | Conditional Access app control | |
|---|---|---|
| Where configured | Entra Conditional Access, session control | Entra Conditional Access, session control Use Conditional Access App Control, plus Defender for Cloud Apps policies |
| How it works | Entra passes device information to the app. The app gives a limited experience on unmanaged or noncompliant devices and a full one on managed and compliant devices. | Reverse proxy. Users are routed to Defender for Cloud Apps for real-time access and session control. |
| Examples | SharePoint Online, Exchange Online (limited access), idle session timeout | Block download, protect on download, block upload of malware, monitor sessions |
- Works with any identity provider. Microsoft Entra apps are onboarded automatically. Apps from other IdPs must be onboarded manually.
- Supports interactive SSO with SAML 2.0. Entra apps also support OpenID Connect and on-premises apps published with Application Proxy.
- Nothing is installed on the device, so it suits unmanaged devices and partner users.
- Session controls apply only to browser-based access. Microsoft Edge users get in-browser protection. Other browsers are redirected through a reverse proxy and show an
*.mcas.msURL suffix. - To stop bypass through native clients, create an access policy that blocks native client access.
- Policies apply at the app level, not per file. The Teams desktop app isn't supported for session controls.
- Installed apps with noninteractive sign-in (such as the Authenticator app) can't be used with access controls.
- Allow the enterprise app Microsoft Defender for Cloud Apps - Session Controls. A Conditional Access policy that blocks it stops users reaching protected apps through session controls.
Access and session policies
- Prerequisites: a Defender for Cloud Apps license, a Microsoft Entra ID P1 license (plus the IdP's license for non-Microsoft IdPs), the apps onboarded, and a Conditional Access policy that uses Use Conditional Access App Control.
- Create the Entra policy as at least a Conditional Access Administrator. Start in Report-only, then switch to On.
- Create the Defender policies in Cloud Apps > Policies > Policy management > Conditional Access > Create policy.
- Policies for a host app (Teams, Exchange) aren't connected to resource apps (SharePoint, OneDrive). Create a separate policy.
- If an App filter isn't set, the policy applies to all apps enabled on the Conditional Access App Control apps page. If filters conflict, manually onboarded apps take precedence.
| Access policy | Session policy | |
|---|---|---|
| Purpose | Allow or block access completely | Allow access while monitoring or limiting session activity |
| Actions | Audit, Block | Monitor only, Block activities, Control file download (Audit, Block, Protect), Control file upload |
| Typical use | Block access from unmanaged devices, block native clients | Block download of sensitive files, block malware upload, protect on download |
Protect (apply a sensitivity label on download) is available only with Control file download (with inspection). By default users are told their session is monitored. Change it under Settings > Cloud apps > Conditional Access App Control > User monitoring.
OAuth app policies
- OAuth app governance shows which permissions each app requested and which users authorized them for Microsoft 365, Google Workspace and Salesforce. Only apps that request delegated permissions are identified.
- An admin marks an app approved, banned or undetermined. Banning disables the enterprise application. Approving has no effect on end users.
- Microsoft's pages differ on creating OAuth app policies: the app permission policy page gives steps (Policies > Policy management > Threat detection > Create policy > OAuth app policy), while the Control cloud apps with policies page says they are built-in and can't be created. The Community use filter shows common, uncommon or rare.
- OAuth app policies alert only for permissions authorized by users in the tenant.
- Built-in anomaly detections: misleading OAuth app name, misleading publisher name, malicious OAuth app consent. Their severity can't be changed and they apply only to apps authorized in Microsoft Entra ID.
CLI and PowerShell
| Task | Azure CLI | PowerShell |
|---|---|---|
| Create the service principal for Microsoft Defender for Cloud Apps - Session Controls (after Connect-MgGraph -Scopes "Application.ReadWrite.All") | - | New-MgServicePrincipal -AppId 8a0c2593-9cbc-4f86-a247-beb7aab00d83 |
Exam Tips
Tick each tip once you can answer it without looking.
“Why discovery doesn't show a home-grown app” → Apps outside the catalog aren't discovered by default. Add a custom app.. Trap: Increasing log volume doesn't add apps to the catalog.
“Quickest cloud discovery on Windows devices on and off the network” → Defender for Endpoint integration (toggle in Advanced features).. Trap: A log collector only sees traffic that passes your firewalls.
“Automate log upload from a firewall using Syslog or FTP” → Log collector (continuous report).. Trap: Manual upload gives a snapshot report.
“Snapshot report data and discovery policy alerts” → Snapshot data doesn't trigger app discovery policy alerts.. Trap: Only continuous reports do.
“Mark an app Unsanctioned” → It doesn't block by itself. Blocking happens via Defender for Endpoint, a supported gateway or a block script.. Trap: Tagging alone doesn't stop use.
“Block unsanctioned apps on an appliance with no proxy redirection” → Generate block script.. Trap: A session policy only works on browser sessions routed through the proxy.
“One app deserves a different score without changing weights” → Override app score.. Trap: Score metrics changes weights for all apps.
“Security matters more than legal in app scoring” → Change importance under Score metrics.. Trap: By default all parameters have equal weight.
“Governance on files and users inside Box, Salesforce or Microsoft 365 via APIs” → Connected apps (API connector).. Trap: Cloud discovery is only traffic-log analysis.
“Real-time control of a browser session on an unmanaged device, nothing installed” → Conditional Access app control (session policy).. Trap: An access policy only allows or blocks.
“Allow access but block downloads of labeled files” → Session policy: Control file download, Block.. Trap: Access policy can't limit activities inside the session.
“Users could bypass the proxy with desktop clients” → Access policy blocking native client access.. Trap: Session controls only cover browser access.
“Session policy exists but nothing is routed to Defender” → Missing Entra Conditional Access policy with Use Conditional Access App Control.. Trap: The Defender policy alone doesn't create the routing.
“Limited SharePoint experience for unmanaged devices” → Application-enforced restrictions: Entra passes device info to the app.. Trap: Conditional Access app control is the reverse-proxy option.
“Ban an OAuth app” → Banning disables the enterprise application. Approving has no effect on users.. Trap: Approval doesn't grant anything.
“Policy for Teams doesn't protect files in SharePoint” → Host and resource app policies aren't connected. Create one for each.. Trap: One policy doesn't cascade.
Sources
- Control cloud apps with policies
- Cloud app discovery overview
- View discovered apps on the Cloud discovery dashboard
- Create cloud discovery policies
- Govern discovered apps
- Cloud app catalog and risk scores
- Add custom apps to cloud discovery
- Integrate Microsoft Defender for Endpoint
- Configure automatic log upload (log collector)
- Connect apps with API connectors
- Governing connected apps
- Conditional Access app control
- Create access policies
- Create session policies
- Automatically onboard Microsoft Entra ID apps
- Create policies to control OAuth apps
- Manage OAuth apps
- Conditional Access: session controls
- Control access from unmanaged devices (SharePoint)
Checked against Microsoft Learn on November 13, 2026.