DefenderHow-to

Defender for Cloud Apps Conditional Access app control: session policies and common errors

Route browser sessions through Conditional Access app control, build session policies that block or protect downloads on unmanaged devices, and fix the errors admins and users hit.

Conditional Access app control lets you allow a cloud app on an unmanaged device while controlling what happens inside the session: block downloads, label files on download, stop copy and print. The setup spans two portals, and most problems come from a gap between them. In this post I'll explain the routing, build the Microsoft Entra policy and a session policy, test them, and decode the common errors.

Errors this guide fixes

  • This website is blocked by your organizationBrowser (user session)
  • Download restrictedBrowser (session policy block)
  • You don't have any apps deployed with conditional access app controlMicrosoft Defender portal (create policy)
  • No apps connectedDefender portal (CA App Control apps page)
  • App is not recognizedBrowser (proxied session)
  • Request session controlDefender portal (CA App Control apps page)
  • Continue SetupBrowser / app status (non-Microsoft IdP app)
  • This site isn't secureBrowser (proxied session)
How this guide is organized: How it works → Prerequisites → Step-by-step → Verify → Tips and gotchasFlow diagram of the article's sections in reading order: 1. How it works. 2. Prerequisites. 3. Step-by-step (4 steps: Route sessions with Conditional Access; Build the session policy; Close the desktop-client bypass; Decide what users see). 4. Verify. 5. Tips and gotchas. Toolbox: Policies › New policy, Target resources › Resources, myapp.com, myapp.com.mcas.ms, *.mcas-gov.us.1How it works2Prerequisites3Step-by-step4Verify5Tips andgotchas1Route sessions withConditional Access2Build the session policy3Close the desktop-clientbypass4Decide what users seeTOOLBOXPolicies › New policyTarget resources › Resourcesmyapp.commyapp.com.mcas.ms*.mcas-gov.usHow this guide is organized: How it works → Prerequisites → Step-by-step → Verify → Tips and gotchasFlow diagram of the article's sections in reading order: 1. How it works. 2. Prerequisites. 3. Step-by-step (4 steps: Route sessions with Conditional Access; Build the session policy; Close the desktop-client bypass; Decide what users see). 4. Verify. 5. Tips and gotchas. Toolbox: Policies › New policy, Target resources › Resources, myapp.com, myapp.com.mcas.ms, *.mcas-gov.us.1How it works2Prerequisites3Step-by-step1Route sessions with Conditional Access2Build the session policy3Close the desktop-client bypass4Decide what users see4Verify5Tips and gotchasTOOLBOXPolicies › New policyTarget resources › Resourcesmyapp.commyapp.com.mcas.ms*.mcas-gov.us
At a glance: how this guide is organized · 4 steps · 5 key settings and tools

How it works#

How Conditional Access app control routes a session to the appUnmanaged device: Browser session, Desktop and mobile clients. Entra ID and Cloud Apps: Session policy, Conditional Access policy, Access policy. Cloud app: Cloud app. Connections: 1. Browser session → Conditional Access policy: Sign-in from a device that isn't compliant. 2. Desktop and mobile clients → Conditional Access policy: Sign-in from a desktop or mobile app. 3. Conditional Access policy → Session policy: Use custom policy hands control to session policies built in Defender. 4. Conditional Access policy → Access policy: Use custom policy also hands control to access policies. 5. Session policy → Cloud app: In-browser protection in Edge, or the reverse proxy (.mcas.ms). 6. Access policy → Cloud app: Block: users must use a web browser.UNMANAGED DEVICEBrowser sessionEdge for Business oranother browserDesktop and mobileclientsSession controls don'tapplyENTRA ID AND CLOUD APPSSession policyControl file download:Block or ProtectConditional AccesspolicyUse Conditional AccessApp ControlAccess policyClient app filter: Mobile anddesktopCLOUD APPCloud appOffice 365 or a SaaS app123456CONNECTIONS1Browser session → Conditional Access policy: Sign-in from a device that isn't compliant2Desktop and mobile clients → Conditional Access policy: Sign-in from a desktop or mobile app3Conditional Access policy → Session policy: Use custom policy hands control to session policies built in Defender4Conditional Access policy → Access policy: Use custom policy also hands control to access policies5Session policy → Cloud app: In-browser protection in Edge, or the reverse proxy (.mcas.ms)6Access policy → Cloud app: Block: users must use a web browserHow Conditional Access app control routes a session to the appUnmanaged device: Browser session, Desktop and mobile clients. Entra ID and Cloud Apps: Session policy, Conditional Access policy, Access policy. Cloud app: Cloud app. Connections: 1. Browser session → Conditional Access policy: Sign-in from a device that isn't compliant. 2. Desktop and mobile clients → Conditional Access policy: Sign-in from a desktop or mobile app. 3. Conditional Access policy → Session policy: Use custom policy hands control to session policies built in Defender. 4. Conditional Access policy → Access policy: Use custom policy also hands control to access policies. 5. Session policy → Cloud app: In-browser protection in Edge, or the reverse proxy (.mcas.ms). 6. Access policy → Cloud app: Block: users must use a web browser.UNMANAGED DEVICEBrowser sessionEdge for Business or another browserDesktop and mobile clientsSession controls don't applyENTRA ID AND CLOUD APPSSession policyControl file download: Block or ProtectConditional Access policyUse Conditional Access App ControlAccess policyClient app filter: Mobile and desktopCLOUD APPCloud appOffice 365 or a SaaS appCONNECTIONS1Browser session → Conditional Access policy:Sign-in from a device that isn't compliant2Desktop and mobile clients → Conditional Accesspolicy: Sign-in from a desktop or mobile app3Conditional Access policy → Session policy: Usecustom policy hands control to session policies builtin Defender4Conditional Access policy → Access policy: Usecustom policy also hands control to access policies5Session policy → Cloud app: In-browser protection inEdge, or the reverse proxy (.mcas.ms)6Access policy → Cloud app: Block: users must use aweb browser
Figure 1 · Architecture How Conditional Access app control routes a session to the app. Entra ID routes matching sign-ins to Defender for Cloud Apps. A session policy controls browser sessions; an access policy blocks desktop and mobile clients.
  • A Microsoft Entra Conditional Access policy with the session control Use Conditional Access App Control sends matching sign-ins to Defender for Cloud Apps. The built-in options are Monitor only and Block downloads; Use custom policy hands control to the access and session policies you build in Defender.
  • Users in Microsoft Edge for Business (signed in with their work profile) get in-browser protection, shown by a lock icon in the address bar, as long as every policy that applies to them is supported there. Other browsers go through a reverse proxy, and the URL gains a suffix: myapp.com becomes myapp.com.mcas.ms (*.mcas-gov.us or *.mcas-gov.ms in government clouds).
  • Session controls only apply to browser sessions (Microsoft supports the latest Edge, Chrome, Firefox and Safari). Desktop and mobile clients, including the Teams desktop app, aren't covered, so block them with an access policy or users can simply bypass the browser.
  • Microsoft Entra ID apps (SAML 2.0, OpenID Connect and Application Proxy apps) are onboarded automatically. Apps that use another identity provider must be onboarded manually.
  • When two session policies match, the more restrictive one wins.

Prerequisites#

  • A Defender for Cloud Apps license and Microsoft Entra ID P1. The Protect action also needs Microsoft Purview Information Protection with a sensitivity label that applies encryption.
  • At least the Conditional Access Administrator role to create the Entra policy.
  • The Microsoft Defender for Cloud Apps - Session Controls enterprise app must not be blocked. Exclude it from "block all apps" policies and include it in location-based policies. If the service principal is missing, create it:
PowerShell
Connect-MgGraph -Scopes "Application.ReadWrite.All"
New-MgServicePrincipal -AppId 8a0c2593-9cbc-4f86-a247-beb7aab00d83

Step-by-step#

1. Route sessions with Conditional Access#

  1. In the Microsoft Entra admin center, go to Entra ID › Conditional Access › Policies › New policy.
  2. Assign a pilot group, and exclude your emergency access accounts.
  3. Under Target resources › Resources, select the apps, for example Office 365 or a SaaS app that uses Entra single sign-on.
  4. Add conditions, such as browser access from devices that aren't compliant.
  5. Under Access controls › Session, select Use Conditional Access App Control and choose Use custom policy.
  6. Start in Report-only and switch to On when the results look right (see What If and report-only mode).

2. Build the session policy#

In the Microsoft Defender portal, open Cloud Apps › Policies › Policy management, select the Conditional Access tab, then Create policy › Session policy:

  • Session control type: Control file download (with inspection). The other types are Monitor only (which records only the sign-in), Block activities (print, copy, send) and Control file upload (with inspection).
  • Activity filters: the app, plus a device tag filter that excludes Intune compliant and Hybrid Azure AD joined devices. Without an app filter, the policy covers every app enabled on the Conditional Access App Control apps page.
  • Files: a sensitivity label, extension, file name or size, and an inspection method such as Data Classification Service or malware detection.
  • Action: Block (optionally email the user and customize the message) or Protect, which applies a sensitivity label to Word, Excel, PowerPoint and PDF files on download. Protect doesn't overwrite a label the file already has.

3. Close the desktop-client bypass#

Create an access policy with the Client app filter set to Mobile and desktop and the action Block, with a message such as "You must use a web browser to access this app." Without that filter, access policies only apply to browser sessions.

4. Decide what users see#

By default users are told their session is monitored; change or clear that under Settings › Cloud Apps › Conditional Access App Control › User monitoring. When a download is blocked, users see Download restricted and get a text file, with your message, instead of the document. Also review Default behavior in the same settings area, which decides whether sessions are allowed or blocked if the service can't enforce policies.

Verify#

  1. Sign out of all sessions, then sign in as a pilot user from an unmanaged device in a private window.
  2. In Chrome, Firefox or Safari the address should end in .mcas.ms; in Edge for Business you should see the lock icon.
  3. Download a file that matches the policy: you should get the block message or a labeled copy.
  4. In the Defender portal, open the policy in Policy management: its report lists redirected sign-ins and blocked or protected downloads. The Activity log shows each matching activity, and the Microsoft Entra sign-in log shows which Conditional Access policy applied the session control.

Tips and gotchas: common errors#

Message or symptomLikely causeWhat to do
This website is blocked by your organizationAn access or session policy, the Block access default behavior, or (with no suffix or lock icon) an unsanctioned app blocked by Defender for EndpointFind the policy in the Entra sign-in log and the Activity log; see unsanctioned app blocks
You don't have any apps deployed with conditional access app control / No apps connectedA non-Microsoft IdP app that isn't onboardedOnboard the app, then create the policy
Entra app missing from the apps pageEntra apps appear once a policy names them, or after a user signs in under a policy with no app filterAdd the app to a policy, or sign in to it through the Conditional Access policy
App is not recognizedCustom app with Entra single sign-on that isn't in the catalogSettings › Cloud Apps › Connected apps › Conditional Access App Control apps, select View new apps, then add the app and its domains
Request session control / Continue SetupNon-catalog or unfinished non-Microsoft IdP appComplete the custom app onboarding
This site isn't secure or "There's no internet connection"Firewall or TLS problem on the proxy pathAllow outbound 443 to the Defender for Cloud Apps addresses for your data center; make sure TLS 1.2 is enabled
Conditional Access App Control option missing in EntraLicensingConfirm Entra ID P1 and Defender for Cloud Apps licenses
Protect action grayed outNo Purview license or integrationCheck the Microsoft Purview license and the Microsoft Information Protection integration setting

For anything else, add your admin account under Settings › Cloud Apps › Conditional Access App Control › App onboarding/maintenance and allow it to bypass from inside a proxied session. The Admin View toolbar then appears in proxied sessions, with Bypass experience (is the proxy the problem?), Record session (for support) and Discovered domains (domains not yet associated with the app).

References#

Written and checked against current Microsoft Learn documentation. Test changes with a pilot group before rolling them out to everyone, and if an admin center path has moved since, search for the setting name instead.

Spotted a mistake, or did this fix work differently for you? Email me or message me on LinkedIn — corrections are credited in the article.

Written by

Omer Eltayeb

Intune Subject Matter Expert in Cairo, Egypt, former Microsoft Cloud Solutions Architect, Microsoft Certified Trainer and Microsoft Innovative Educator Expert (2024–26) and Microsoft Elevate Educator Expert (2026–27). I share practical, step-by-step guides, study plans, scripts and toolkits for Microsoft Intune, Configuration Manager, Microsoft Entra ID, Microsoft Defender, Exchange and Microsoft 365 with the community.

Microsoft Certified Trainer (MCT) 2026Microsoft Innovative Educator Expert 2025–2026Microsoft Elevate Educator Expert 2026–2027ISC2 Certified Information Systems Security Professional (CISSP)Microsoft 365 Certified: Enterprise Administrator Expert (MS-102)