Insider Risk Management Part 7: Insider risk in Conditional Access and the Data Security Triage Agent

Insider Risk Management Part 7: Insider risk in Conditional Access and the Data Security Triage Agent

Series: This is Part 7 of 7 in my series on Microsoft Purview Insider Risk Management. New to the series? Start with the series guide, which summarises every part.

This is the final part of the series, and it brings everything together. Insider Risk Management spots risky behaviour. Adaptive Protection turns it into a risk level. In this part, that risk level reaches the front door – sign-in – and an AI assistant helps your compliance team deal with the alerts.

Part A: Insider risk in Conditional Access

Conditional Access is the set of rules in Microsoft Entra ID that decides who can sign in to what, from where and on which device. Most organisations already use it – for example, to require multi-factor authentication. Since July 2024, it can also use a person’s insider risk level as a condition.

That means the same risk level that tightens DLP in Part 5 can also block or restrict someone’s access to Microsoft 365 apps. You need Microsoft Entra ID P2, which is included in E5, and Adaptive Protection switched on.

What Microsoft recommends for each level

Level Recommended Conditional Access response Effect on the person
Elevated Block sign-in to Microsoft 365 apps, block access to specific labelled SharePoint sites, or block downloads from cloud apps Cannot reach the data at all
Moderate Require them to accept Terms of Use when signing in to admin portals A reminder of their obligations, with no loss of access
Minor Run a policy in report-only mode None – you just gain visibility

The Copilot angle: Blocking an Elevated person from specific labelled SharePoint sites also stops Microsoft 365 Copilot generating answers from those sites for them. A risky person cannot use Copilot as a back door to sensitive content.

Creating the block policy for Elevated risk

If you ran Adaptive Protection quick setup in Part 5, a policy called “1-Block access for users with Insider Risk” already exists in report-only mode. To create one yourself, sign in to the Microsoft Entra admin center as at least a Conditional Access Administrator and:

  1. Go to Entra ID > Conditional Access > Policies and select New policy.
  2. Users: include All users. Exclude your emergency access (break-glass) accounts and guest or external user types.
  3. Target resources: include All resources.
  4. Conditions: select Insider risk, set Configure to Yes, and tick Elevated.
  5. Grant: select Block access.
  6. Enable policy: set it to Report-only and select Create.
  7. Review the report-only results for a few weeks, then switch the policy to On.

Never skip report-only: Blocking sign-in is the strongest action in this series. Run it in report-only first, check exactly who would have been blocked, and always exclude your emergency access accounts so a mistake cannot lock everyone out.

Part B: The Data Security Triage Agent

Every insider risk policy produces alerts, and someone has to look at them. On a busy day that queue can be long, and the most important alert can sit behind dozens of harmless ones. The Triage Agent is an AI assistant, built on Security Copilot, that reads each alert first and sorts the queue so your compliance team starts with what matters.

It does not investigate, decide or take action. It sorts and explains. A person still makes every decision.

How the Triage Agent sorts insider risk alerts

How it sorts alerts

Category What it means
Needs attention The alerts the agent judged highest risk. Start here.
Less urgent Lower-risk alerts to review when you have capacity.
Not categorized Alerts the agent could not assess – for example, unsupported activity or an error. These still need a person to look at them.

For each alert, it weighs up the person (for example, whether they are a priority user and how many cases they already have open), the activity (how likely it is to be data leaving the organisation) and the content involved, and writes a short plain-English explanation of its decision.

How it runs and what it costs

  • Scope: you choose which insider risk policies it covers, and whether it looks only at new alerts or also at alerts from up to 30 days back.
  • Schedule: it can run automatically on a schedule, or an analyst can run it on one alert at a time.
  • Cost: each alert it processes uses Security Compute Units (SCUs). Microsoft 365 E5 includes 400 SCUs a month for every 1,000 users, up to 10,000 a month – see Part 3.
  • Feedback: analysts can give feedback on its decisions, which it takes into account when it triages future alerts.

Getting started well

  1. Tune noisy policies first. The agent sorts what your policies produce – and every alert costs credits.
  2. Start with new alerts only, then widen the lookback once you trust the results.
  3. Compare for two weeks. Have your compliance team triage as normal and compare their view with the agent’s.
  4. Check Not categorized every day. Those alerts have not been assessed by anyone yet.
  5. Watch your SCU usage in Security Copilot, so the monthly allowance is not used up by one noisy policy.

The people reviewing the sorted queue need the same Insider Risk Management roles as before – Analysts or Investigators, through PIM. Setting up the agent needs additional Purview agent and Security Copilot roles.

Bringing it full circle

Over seven parts, we have gone from a licence sitting on the shelf to a joined-up system:

  • Insider Risk Management spots risky behaviour, starting with people who are leaving.
  • Adaptive Protection turns that behaviour into a risk level.
  • DLP and Conditional Access tighten automatically for the few who need it.
  • The Triage Agent helps your compliance team deal with the alerts.
  • Compliance officers, not IT, own the process, with access controlled through PIM.

And all of it is included in the Microsoft 365 E5 licence many organisations already pay for.

Final thoughts

If you take one thing from this series, make it this: if you have E5 and no insider risk policies, you are paying for protection you are not using. Start small – one departing users policy, a few compliance officers, quick setup in simulation – and build from there. The scripts and KQL queries from Part 4 will help you prove it works.

Thank you for following the series. If you have questions or want to talk about your own deployment, get in touch through cloud-secure.ai.


The rest of the series

References

Seรกn O’Farrell | cloud-secure.ai

Microsoft Defender AI agent runtime protection: the series guide (parts 1 to 7)

Microsoft Defender AI agent runtime protection series guide, parts 1 to 7

Series guide: seven parts on securing the AI agents in your organisation, from Microsoft Defender for Endpoint on the device, to governance in Microsoft Agent 365, to classifying the data they can reach with Microsoft Purview: what each part covers, and where to start.

AI agents such as Claude Code, GitHub Copilot and Gemini CLI are already on managed endpoints, running with the full rights of the signed-in user and connecting to MCP servers that nobody has reviewed. This series works through what Microsoft Defender for Endpoint can do about that today: detecting prompt injection, finding the agents, and controlling and automatically blocking the servers they talk to. It then moves up a level to Microsoft Agent 365, where you decide which agents exist, who owns them and what they can reach, and finally to Microsoft Purview, where classification decides what data is allowed through once a destination is approved.

Every part is built and tested in a lab or dev tenant, with screenshots of what actually happened, including where the product or the documentation did not behave as expected.

The series at a glance

Part Question it answers What you get
Part 1 What is AI agent runtime protection? How Defender detects prompt injection against local AI agents
Part 2 Does it work, and how do I build it? A lab build, validation, and the gaps in the documentation
Part 3 Which agents are running on my endpoints? The Local agents view, licensing and advanced hunting queries
Part 4 How do I stop an agent reaching an MCP server? Custom domain indicators, network protection and a custom detection rule
Part 5 How do I block every new MCP server automatically? An Azure Automation runbook that blocks by default, with scripts on GitHub
Part 6 How do I govern every agent, not just the ones on endpoints? Agent 365 approval, owners and sponsors, and Conditional Access for agents, with a script on GitHub
Part 7 What can DLP protect if nothing has been classified? Purview classification methods, the types of DLP, and a layered design to protect Contoso’s intellectual property

What each part covers

Part 1: the control for agents already on your endpoints

The starting point: what AI agent runtime protection is, which agents it covers and how it detects prompt injection against agents running locally on your endpoints. If you are new to the topic, start here.

Part 2: building it, proving it, and where the documentation is wrong

The lab build and the validation work behind it. It shows the protection working end to end, and records where the published documentation did not match what the tenant actually served, so you do not lose the same time I did.

Part 3: finding the agents you did not know you had

Visibility before control. The Local agents view in the Defender portal, why discovery is activity based rather than installation based, the licensing split between the inventory and the risk assessment, and a set of advanced hunting queries that go well beyond what the portal shows.

Part 4: controlling where Claude can connect

Runtime protection does not decide which MCP servers an agent may reach. Part 4 closes that gap for a known server: a Defender for Endpoint custom domain indicator, enforced by network protection, blocks Claude Code from an unsanctioned remote MCP server. It covers why the indicator must be the bare domain, why Edge enforces it before network protection does, and a custom detection rule to alert on the blocks.

Part 5: blocking MCP servers you have not approved

An indicator only blocks the domains you list. Part 5 automates it: an Azure Automation runbook with a managed identity runs every hour, finds every new remote endpoint an AI agent has used, and blocks it with a Defender indicator and an alert. Approved servers are permitted with an Allow indicator. It is tested with Claude Code, GitHub Copilot CLI and Gemini CLI (an agent runtime protection does not support), and the scripts are on GitHub.

Part 6: moving AI agent governance from Defender into Agent 365

Parts 1 to 5 act on the device, once an agent is already running. Part 6 moves up to governance in Microsoft Agent 365, where every agent in the tenant is inventoried and approved before people can use it. A dev tenant with 318 agents had only 84 visible to Entra, so most were out of reach of Conditional Access. The post works through four gates: who can build, Agent 365 approval, owners, sponsors and access packages, and Conditional Access and ID Protection for agents. It also covers the Workload ID Premium gap that E7 does not include, and a companion script on GitHub that reviews the tenant and creates the policies in report-only mode.

Part 7: data classification first – protecting Contoso’s intellectual property

Parts 1 to 6 decide where data is allowed to go. Part 7 answers the question that has to come first: what is the data? Once a destination is approved, whether an MCP server, Copilot or an AI app, only a control that recognises the content can stop the wrong data reaching it. The post covers every Purview classification method – sensitivity labels, custom SITs, exact data match, document fingerprinting and trainable classifiers – and the types of DLP that act on them, from Endpoint DLP to inline web traffic and the Copilot location. It walks through how proximity and confidence levels keep a custom SIT from flooding the alert queue, where GSA prompt injection protection fits and where it does not, finding IP already at rest with eDiscovery, and the Triage Agent in DLP. It is the foundation the other six parts stand on.

Where to start

  • New to the topic: read part 1, then part 3 to see what is already running in your estate.
  • Building a lab or a proof of concept: part 2.
  • Need to control MCP servers now: part 4 for a single server, then part 5 to block every new one automatically.
  • Need to know which agents exist and who approved them: part 6.
  • Need to stop sensitive data reaching agents and AI apps you have approved: part 7, the foundation every other control relies on.

More to come

The series is not finished. Microsoft is moving quickly on AI agent security in the Defender portal, and the next parts will follow the new capabilities as they arrive, including the new Sentinel workbook and automation features in the Defender portal. Each one is built and tested in a lab before it is written up.

Follow along on cloud-secure.ai or connect with me on LinkedIn to hear when the next part is published.


The series

Disclaimer: The views in this series are my own. They do not represent my employer, or Microsoft or any other vendor whose products are discussed here.

Seรกn O’Farrell | cloud-secure.ai

Entra Internet Access inline DLP: stopping sensitive data before it reaches AI apps

Entra Internet Access inline DLP: Entra Internet Access, Purview inline DLP and Scan with Purview, stopping sensitive data before it reaches AI apps

Scripts on GitHub: the PowerShell scripts, READMEs and test samples used in this post are in cloud-secure-ai/entra-internet-access-inline-dlp.

Summary

People paste customer lists, contract wording and project codes into ChatGPT and other AI apps every day, often from browsers IT does not control. This post shows how to stop that at the network, before the data leaves: Microsoft Entra Internet Access routes browser traffic through Microsoft’s cloud and decrypts it, then hands the content to Microsoft Purview, which blocks anything matching a sensitive information type. It works in any browser and needs no browser extension.

This post records a working deployment, tested in October 2026. File uploads were blocked on all six applications tested, and typed or pasted prompts on five of six - the exception is Claude, which sends prompts in a binary format Purview can’t read (see Coverage findings).

Every step is shown with screenshots so it can be followed and checked in the portal, and the repeatable parts are scripted - see Scripts. If you are new to Global Secure Access, read the key terms below first.

Key terms

  • Global Secure Access (GSA) - Microsoft’s Security Service Edge (SSE): a cloud service that device traffic is routed through so it can be inspected and controlled. Entra Internet Access is the part that handles internet and SaaS traffic.
  • Global Secure Access client - the agent on the device that sends its traffic to Global Secure Access.
  • TLS inspection - decrypting HTTPS traffic inside Global Secure Access so its content can be read. Devices must trust the inspection certificate, or every inspected site shows a certificate error.
  • Microsoft Purview DLP - data loss prevention policies that detect sensitive data and decide whether to allow or block it.
  • Sensitive information type (SIT) - the pattern Purview looks for, such as a regular expression plus supporting keywords.
  • Scan with Purview - the Global Secure Access content policy action that hands decrypted content to Purview for a verdict.
  • Adaptive app scope - a Purview-managed group of applications, such as All unmanaged AI apps, built from the Defender for Cloud Apps catalogue.
  • Enforcement plane - where a DLP policy acts: the browser plane (inside Edge for Business) or the network plane (Global Secure Access, used here).
  • QUIC - the UDP-based protocol behind HTTP/3. Global Secure Access can’t inspect it, so it must be turned off in browsers.

Purpose and scope

This post sets out how to deploy Microsoft Purview inline DLP over Microsoft Entra Internet Access, and how to verify that it actually protects a given generative AI application. Specifically, it covers the Network and non-Microsoft secure browsers option on the DLP policy’s Choose where to enforce the policy page, with Edge for Business left off (see Architecture).

It is written for engineers and architects deploying the control in their own tenant or in customer tenants. It assumes working knowledge of Entra ID, Conditional Access, Intune and Purview; the key terms above cover the rest.

The scope is the network enforcement plane: sensitive data leaving the organisation through unmanaged cloud and generative AI applications, inspected at the network layer rather than in the browser. Prompt injection protection, which inspects content going to the model rather than data leaving the organisation, is a separate Global Secure Access feature with its own prompt policies and is out of scope.

Coverage is not uniform across applications. The Coverage findings section sets out tested results, and Known limitations and residual risk sets out what remains; both should be read before the control is presented to a customer as complete.

Architecture

In the Purview DLP policy wizard, the Choose where to enforce the policy page offers two options. This post is about the second one.

  • Edge for Business - inline protection built into Microsoft Edge for Business on managed work devices, for a published list of supported apps. It is also a pay-as-you-go capability, and to be effective Edge must be the default browser with third-party browsers blocked; otherwise a user can simply switch browser.
  • Network and non-Microsoft secure browsers - inspection in the network path through Global Secure Access, using Scan with Purview. It works in Chrome, Firefox and any other browser, as well as Edge, and covers any application in the Defender for Cloud Apps catalogue.

This post configures Network and non-Microsoft secure browsers on its own, with Edge for Business left off. It is aimed primarily at browsers other than Edge: organisations that can’t or won’t standardise on Edge and block every other browser still get the same protection, whichever browser people use.

Global Secure Access acquires the traffic, terminates TLS, and passes the decrypted payload to Purview for classification. Purview returns a verdict and Global Secure Access enforces it. Because enforcement happens at the network layer, a block is returned as an HTTP 403 and the application renders whatever error it chooses.

How Scan with Purview works

Preview. At the time of writing (October 2026), Scan with Purview - the Purview DLP integration with Entra Internet Access - is still in preview. Microsoft’s message centre post MC1181769 schedules general availability to roll out between the end of September and the end of October 2026, so confirm the status in the tenant before presenting the control to a customer as generally available.

Scan with Purview is the link between the two services. Global Secure Access carries and decrypts the traffic; Purview decides whether the content may leave. Neither does the other’s job: Global Secure Access doesn’t classify content, and Purview can’t see network traffic unless Global Secure Access hands it over.

Scan with Purview: users and devices connect through dedicated tunnels to Global Secure Access, which sends content to Microsoft Purview and enforces the policy verdict before traffic reaches websites and cloud applications.
  • Acquire. The Global Secure Access client sends the device’s traffic through a dedicated tunnel to Global Secure Access, Microsoft’s Security Service Edge. Conditional Access decides which security profile applies to the user, and continuous access evaluation (CAE) keeps that decision current during the session.
  • Decrypt. TLS inspection terminates the connection so the request body - a prompt or an uploaded file - can be read. Without TLS inspection there is nothing to scan.
  • Hand over. A content policy rule with the action Scan with Purview passes the decrypted content to Purview. With Use destinations and activities defined in Purview selected, the Purview adaptive app scope decides which applications are in scope.
  • Classify and decide. Purview checks the content against the sensitive information types in the inline web traffic DLP policy for that user, application and activity, and returns a verdict - allow, audit or block.
  • Enforce. Global Secure Access applies the verdict. An allowed request continues through the outbound tunnel to the website or cloud application; a blocked one gets an HTTP 403, and the application shows its own error.
  • Record. The request appears in the Global Secure Access traffic logs, and a match appears in Purview Activity explorer and as a DLP alert - the three logs used in Validation.

What Purview can read. Text sent as JSON, plain text, HTML or XML, and supported file formats, up to 3 MB for both text and files through Scan with Purview. Content Purview can’t parse, such as a prompt sent as binary Protocol Buffers, passes without a verdict. That is why Claude’s file uploads are blocked but its typed and pasted prompts are not (see Coverage findings).

Fail-open. If Purview can’t complete an inspection - the content is too large, for example - the traffic is allowed. These transactions can be found in the traffic logs using the PurviewStatus field.

Requirement specific to this path. The Azure subscription behind Scan with Purview must have the Microsoft.Purview resource provider registered. Otherwise traffic reaches Purview and no verdict comes back (see Common failure modes).

Prerequisites

Licensing requires one of two combinations per user: Microsoft 365 E7, or Purview E5 (or equivalent) plus Entra Internet Access. Purview pay-as-you-go billing must also be set up before Step 10: the DLP policy wizard only offers the Network enforcement option once it is. Microsoft’s setup guide is linked under Microsoft documentation.

Requirement Detail
Licensing M365 E7, or Purview E5 + Entra Internet Access
Roles Global Secure Access Administrator; Conditional Access Administrator; Intune Administrator; a Purview role able to create DLP policies
Graph scopes (read) NetworkAccess.Read.All, Policy.Read.All, Directory.Read.All, Group.Read.All, DeviceManagementConfiguration.Read.All
Tenant state Global Secure Access onboarded; Internet Access traffic forwarding available
Endpoints Windows 11, Intune-managed, Global Secure Access client installed

Constraint 1 - B2B guest users are out of scope

Microsoft Purview network and browser data security policies do not apply to B2B guest users. A guest signed in with an external identity is not evaluated, regardless of the device they are using or the policy scope.

This matters more than it first appears. Many organisations onboard contractors, consultants and partner staff as guests precisely so they can be managed centrally. Those users are frequently the ones handling material a customer would most want protected, and they fall outside this control entirely.

Three practical responses:

  • Where external staff handle sensitive material regularly, issue member accounts rather than guest accounts. This is the only option that brings them into scope.
  • Where guest access must remain, do not rely on DLP for that population. Use web content filtering to block the generative AI category outright for guests, which is an access control rather than a content control and does apply.
  • State the exclusion explicitly in any coverage statement given to a customer. A claim that sensitive data is blocked from AI applications is incorrect for the guest population, and discovering that during an incident is considerably worse than disclosing it during design.

Constraint 2 - group membership and assignment surfaces

The solution assigns objects across three surfaces, and they do not use the same kind of group:

Object Assigned to Group type
Intune trusted certificate profile Devices Device group
Intune QUIC settings catalog policy Devices Device group
Conditional Access policy applying the security profile Users User group
Traffic forwarding profile Users or devices Either, depending on configuration

A device missing from the device group receives neither the root CA nor the QUIC policy. A user missing from the user group is never scoped into the security profile. Both produce the same end-user symptom - nothing is blocked - and neither surfaces as an error anywhere in the console.

Reading Intune assignment status correctly. The check-in status on a configuration profile reports four counts: Succeeded, Error, Conflict and Not applicable. Those counts describe devices that were targeted. A profile targeting devices that cannot apply it reports a non-zero Not applicable. A profile targeting nothing at all reports:

  • Succeeded: 0
  • Error: 0
  • Conflict: 0
  • Not applicable: 0

All four at zero is not a healthy profile with nothing to do. It means the profile has no targets, either because no assignment exists or because the assigned group is empty. There is no warning, no amber state and no message; the page looks the same as a profile that has simply not been picked up yet.

Verify membership directly rather than inferring it from assignment reporting. On the endpoint, confirm the certificate is present in the Local Computer trusted root store and that chrome://policy or edge://policy shows QuicAllowed applied as a machine policy. Those two checks confirm delivery in a way the Intune console does not.

Building a test lab

If you are proving the control in a lab before production, three prerequisites are easy to overlook, and each produces a failure that looks like a policy problem rather than a setup problem.

Lab build

Component Requirement
Test endpoint Windows 11 VM, Entra-joined and Intune-enrolled, member of the group used for all assignments
Azure VM Microsoft Entra ID login extension installed. The test account needs the Virtual Machine User Login or Virtual Machine Administrator Login role. Entra Internet Access policies are identity-based, so the test server must be signed in with an Entra ID identity.
Test identity An Entra account licensed for Entra Internet Access. Sign in to the Global Secure Access client with that identity - an unlicensed account leaves the client showing connected while the traffic is never acquired
Azure subscription The subscription backing Scan with Purview must have the Microsoft.Purview resource provider registered. Subscription > Settings > Resource providers
Sensitive information type A custom SIT with a distinctive pattern unlikely to occur naturally, so matches are unambiguous

Test artefacts

Prepare two items carrying the same sensitive information type:

  • A short text string for pasting into prompt boxes.
  • A Word document containing that string in its body, kept under 3 MB. Place the value in the body rather than only the filename or document properties, and put a keyword (for example “project reference”) next to it. Repeating the value raises the instance count, not the confidence level - without a keyword it only matches at Medium.
Test artefacts - screenshot 52

Test matrix

Run each row in Edge and Chrome, signed in to the application, and capture the traffic log evidence for each.

Test Expected observation
Paste the string into the prompt Blocked where the application submits JSON; passes where it submits a binary transport
Upload the document Blocked - multipart/form-data is parseable
Paste the document’s contents into the prompt Same result as the paste test, not the upload test

The third row is the one worth running explicitly. It is the natural user response to a refused upload, and on an application with a binary transport it succeeds where the upload failed.

Isolating the result

Disable or remove any Edge for Business DLP policy before testing the network plane, and confirm in Activity Explorer that the enforcement plane reads network. With both planes active, a browser-plane block is easily attributed to the network policy under test.

Other controls in the lab - Defender for Cloud Apps policies, Defender network protection - can block an application before the request reaches Global Secure Access. Confirm the application loads and a benign prompt succeeds before introducing the sensitive information type.

Implementation sequence

The order matters. Enabling TLS inspection before the root CA is trusted breaks every inspected site for users in scope.

Automate it: steps 3 and 4 (Deploy-GsaEndpointPrereqs.ps1), step 9 (Import-ContosoSIT.ps1) and step 10 (New-PurviewInlineDlpPolicy.ps1) can be run with the scripts in the GitHub repository. Each script has its own README. The steps below show the same configuration manually so it can be checked in the portal.

Before you start

Have these in place before Step 1. Each one, if missed, shows up later as “nothing is blocked” with no error to explain why.

  • Licences assigned to the pilot users (see Prerequisites).
  • Purview pay-as-you-go billing set up, linked to an Azure subscription in the same tenant. Only a Global Administrator can do this; see Microsoft documentation.
  • Microsoft.Purview resource provider registered on that subscription: Azure portal > Subscriptions > your subscription > Settings > Resource providers. Without it, traffic reaches Purview and no verdict comes back.
  • Two pilot groups: a device group for the Intune profiles and a user group for Conditional Access, with the same people and devices in both (see Constraint 2).
  • Test devices: Windows 11, Entra joined or hybrid joined, Intune-enrolled, with the Global Secure Access client installed.
  • Roles: Global Secure Access Administrator, Conditional Access Administrator, Intune Administrator, and a Purview role that can create DLP policies.
  • The scripts, if you are using them, downloaded from the GitHub repository.

Step 1 - Enable Internet Access traffic forwarding

Global Secure Access > Connect > Traffic forwarding: enable the Internet access profile and assign it to the pilot users or groups. Deploy the Global Secure Access client to the test devices and confirm it shows Connected against the correct tenant. In the client’s Advanced diagnostics > Forwarding profile, Internet Access rules should appear; this can take up to 15 minutes.

Step 1 - Enable Internet Access traffic forwarding - screenshot 3

Step 2 - Create the TLS inspection certificate

Global Secure Access > Secure > TLS inspection policies > TLS inspection settings > Create certificate > Microsoft-managed. Microsoft generates a tenant-specific root CA and retains the private key. Alternatively, generate a CSR and sign it with the organisation’s own PKI.

Step 2 - Create the TLS inspection certificate - screenshot 4

Why this step stays manual. Microsoft generates a unique certificate authority every time a certificate is created. The root downloads as M-TLSi-<id>-root.cer (for example M-TLSi-h1i4m-root.cer), and the <id> changes with each new certificate, including a rotation. It can’t be copied from another tenant or recreated from a template, and the published Graph API only covers the own-PKI (CSR) flow. Create it here, then use … > Download root certificate.

In the portal the certificate always appears as Microsoft-managed TLS inspection CA, with its ID underneath (for example M-TLSi-h1i4m), type Managed and status Disabled. Note the ID and the Root CA expiration date, and leave the certificate disabled until Step 3 is complete.

Microsoft-managed certificates aren’t exposed through Microsoft Graph. Tested in October 2026, /beta/networkAccess/tls/externalCertificateAuthorityCertificates returned an empty list while the certificate was Active - that endpoint only holds own-PKI (CSR) certificates. So Deploy-GsaEndpointPrereqs.ps1 can’t look the certificate up by its display name. It works from the downloaded root instead (-CertificateId h1i4m picks M-TLSi-h1i4m-root.cer), confirms it is a Microsoft-managed root (subject CN=Microsoft Entra TLS Inspection Root CA, O=Microsoft) and prints the ID, thumbprint and expiry to check against the portal.

Step 2 - Create the TLS inspection certificate - screenshot 5

Step 3 - Distribute the root CA to endpoints

Download the root certificate and deploy it with an Intune trusted certificate profile. Destination store must be Computer certificate store - Root. Assign it to the device group, then confirm on a test device before proceeding.

Automated: Deploy-GsaEndpointPrereqs.ps1 creates the trusted certificate profile from the downloaded M-TLSi-<id>-root.cer (Computer certificate store - Root) and assigns it to the device group. It warns if the group has no devices. See Deploy-GsaEndpointPrereqs-README.md.

Step 3 - Distribute the root CA to endpoints - screenshot 6
Step 3 - Distribute the root CA to endpoints - screenshot 7

Step 4 - Apply client prerequisites

Global Secure Access can’t inspect QUIC (HTTP/3) or DNS over HTTPS, so turn both off in the browsers. In an Intune settings catalog policy, for both Microsoft Edge and Google Chrome, set Allow QUIC protocol to Disabled and Control the mode of DNS-over-HTTPS to Disabled, and assign it to the device group. Optionally, also block outbound UDP 443 at the Windows firewall:

# Optional: block QUIC (UDP 443) at the Windows firewall
New-NetFirewallRule -DisplayName "Block QUIC" -Direction Outbound -Action Block -Protocol UDP -RemotePort 443

Automated: Deploy-GsaEndpointPrereqs.ps1 creates the QUIC part of this policy (QuicAllowed set to Disabled for Edge and Chrome) and assigns it to the device group. The DNS-over-HTTPS setting and the optional firewall rule remain manual. See Deploy-GsaEndpointPrereqs-README.md.

Step 4 - Apply client prerequisites - screenshot 8
Step 4 - Apply client prerequisites - screenshot 9

Step 5 - Create the TLS inspection policy

Global Secure Access > Secure > TLS inspection policies > Create policy. Name it, set Action to Inspect, then select Next, Next and Submit. With Inspect as the default, all traffic is decrypted unless it matches a bypass rule. Microsoft adds two bypass rules automatically - a system rule for destinations that are incompatible with TLS inspection, and a recommended bypass list for sensitive categories - so keep both.

Now enable the certificate. Once Step 3 is confirmed on a test device, go to the TLS inspection settings tab, select the ellipsis on the certificate and choose Enable. Its status changes to Active within a few minutes. Enabling it before devices trust the root breaks every inspected site.

Step 5 - Create the TLS inspection policy - screenshot 10
Step 5 - Create the TLS inspection policy - screenshot 11
Step 5 - Create the TLS inspection policy - screenshot 12

Step 6 - Create the security profile

Global Secure Access > Secure > Security profiles > Create profile. Name it, select Next, then Link a policy > Existing TLS inspection policies, choose the policy from Step 5, select Add, Next and Create a profile. Link any web content filtering or threat intelligence policies the profile also needs, and set its priority. The content policy is linked in Step 7.

Step 6 - Create the security profile - screenshot 13

Step 7 - Create the content policy

Global Secure Access > Secure > Content policies > Create Policy. Name it, select Next, then Add a new rule with the action Scan with Purview and select Use destinations and activities defined in Purview for this rule. Choosing Specify destinations for this rule instead means the rule’s own destination list governs and the Purview adaptive scope is ignored.

Step 7 - Create the content policy - screenshot 14
Step 7 - Create the content policy - screenshot 15

Leave Session type blank. It is an optional filter: left unset, the rule applies to all traffic, whereas Agent limits it to AI agent traffic only.

Then link the content policy to the security profile: Security profiles > your profile > Link a policy > Existing Content policy, select it and keep the default state.

Step 8 - Link the security profile via Conditional Access

Entra admin centre > Entra ID > Conditional Access > Create new policy. Assign it to the pilot user group. Under Target resources, select All internet resources with Global Secure Access. Under Session, select Use Global Secure Access security profile and choose the profile from Step 6. Set Enable policy to On and create it. The profile can take up to an hour to take effect.

Step 8 - Link the security profile via Conditional Access - screenshot 16
Step 8 - Link the security profile via Conditional Access - screenshot 17
Step 8 - Link the security profile via Conditional Access - screenshot 18

Step 9 - Create the Purview sensitive information type (SIT)

Run Import-ContosoSIT.ps1 (see Import-ContosoSIT-README.md), or create the type by hand in the Purview portal under Information Protection > Classifiers > Sensitive info types, using the values below. The script only creates the new type and never changes an existing one. For production, replace the demo pattern with your organisation’s own identifiers.

Keywords: project reference, project ref, project code, codename, confidential project, Contoso project

Regex: \bCONTOSO-[A-Z]{3}-\d{6}-[A-Z]\b

Format: CONTOSO-AAA-999999-A, for example CONTOSO-FIN-204815-K. It matches at High confidence when a keyword is within 300 characters, and at Medium for the value on its own.

Confirm the import: Get-DlpSensitiveInformationType -Identity "Contoso Project Reference (Demo)" | Format-List Name, Id, Publisher.

Allow time: a new type can take a few minutes to appear in the portal, and policy changes up to 24 hours to reach enforcement.

Step 9 - Create the Purview sensitive information type (SIT) - screenshot 19

Step 10 - Create the Purview DLP policy

Purview portal > Data loss prevention > Policies > Create policy > Inline web traffic, then Custom > Custom policy. Add the required adaptive app scopes, including All unmanaged AI apps. Enable Network and non-Microsoft secure browsers and leave Edge for Business off unless browser-plane coverage is also intended. Choose Create or customize advanced DLP rules and add the rule below.

Settings used in this lab (as in the screenshots below): data source All unmanaged AI apps, all users; Network and non-Microsoft secure browsers on, Edge for Business off; rule Scan with Purview Inline - content contains the custom sensitive information type at High confidence, instance count 1 to Any; all four activities; action Block; email to the user who performed the activity; admin alert on every match, severity Low. At High, the test content needs a keyword near the value (the test strings use “project reference”); use Medium to match the value on its own.

Automated: New-PurviewInlineDlpPolicy.ps1 creates this policy and rule. Pay-as-you-go billing must be set up first, as the Network option only appears once it is. See New-PurviewInlineDlpPolicy-README.md.

Step 10 - Create the Purview DLP policy - screenshot 20
Step 10 - Create the Purview DLP policy - screenshot 21
Step 10 - Create the Purview DLP policy - screenshot 22
Step 10 - Create the Purview DLP policy - screenshot 23
Step 10 - Create the Purview DLP policy - screenshot 24

The adaptive scopes read the app catalogue from Defender for Cloud Apps; they do not read Defender for Cloud Apps tags (sanctioned, unsanctioned).

Step 10 - Create the Purview DLP policy - screenshot 25
Step 10 - Create the Purview DLP policy - screenshot 26
Step 10 - Create the Purview DLP policy - screenshot 27
Step 10 - Create the Purview DLP policy - screenshot 28
Step 10 - Create the Purview DLP policy - screenshot 30
Step 10 - Create the Purview DLP policy - screenshot 31
Step 10 - Create the Purview DLP policy - screenshot 32
Step 10 - Create the Purview DLP policy - screenshot 33
Step 10 - Create the Purview DLP policy - screenshot 34
Step 10 - Create the Purview DLP policy - screenshot 35

Common failure modes

Each of the following presents to the user as the same symptom - the policy did not block - and each has a different cause. Work through them in order; the first three account for most deployment failures.

Group membership

The single most common cause. If the device is not a member of the group used for Intune assignment, neither the root CA nor the QUIC policy reaches it, and the Conditional Access policy may not apply to the user.

The tell is an Intune profile reporting 0 succeeded, 0 error, 0 conflict, 0 not applicable. Zero across all four is not a healthy profile with nothing to do - it means no targets. Verify membership before investigating anything else.

Untrusted inspection certificate

If TLS inspection is enabled before the root CA is trusted on the endpoint, every inspected site fails with ERR_CERT_AUTHORITY_INVALID. On sites using HSTS the browser offers no bypass at all, so the user cannot proceed even if they wanted to.

Confirm the certificate is present in the Local Computer trusted root store, not Current User. Install it manually on one device to prove the chain resolves, then fix the Intune delivery rather than leaving the manual install in place.

Untrusted inspection certificate - screenshot 36

Certificate path length constraint

Where the organisation’s own PKI signs the inspection certificate, a root enforcing pathLenConstraint = 1 prevents the Global Secure Access intermediate from validating beneath it. The symptom is ERR_CERT_INVALID rather than ERR_CERT_AUTHORITY_INVALID, on every inspected site, with the root correctly installed.

QUIC bypass

Traffic negotiating HTTP/3 leaves the tunnel entirely rather than falling back to TCP. There is no traffic log entry at all, which is indistinguishable from a policy that is not working. Confirm QuicAllowed is applied at chrome://policy and edge://policy before concluding anything from an empty log.

Content rule destination scope

If the content rule uses Specify destinations for this rule, only those destinations are offered to Purview for scanning. The Purview adaptive app scope is then irrelevant, and the result is one application blocking while others pass, with a policy that appears correctly configured.

Resource provider not registered

If the Azure subscription backing Scan with Purview does not have Microsoft.Purview registered, the scan path does not function. Traffic reaches Purview and no verdict returns.

Resource provider not registered - screenshot 37

Validation

Coverage must be verified per application. A policy that is correctly scoped can still fail to protect an application, and nothing in the console indicates this.

The method:

  1. Submit the sensitive information type into the application and note the behaviour. Errors are generic: applications render their own failure text, not a policy message.
  1. Export the Global Secure Access traffic logs and open the Transactions tab. Per-request detail is not on the Connections tab.
  2. Filter to the application’s host and locate the POST carrying the payload, identified by a non-trivial sentBytes value.
  3. Read httpRequestContentType before reading action. JSON, form-encoded or plain text predicts enforcement; application/connect+proto, grpc or similar binary encodings predict the request passing uninspected.
  4. Confirm against action and policyRuleName, then cross-check Purview DLP alerts for a matching entry at location ExtendedApplications.

Predicting the outcome from the content type before reading the action distinguishes a demonstrated mechanism from a coincidence.

To confirm which enforcement plane acted, filter Purview Activity Explorer on enforcement plane: network indicates Entra Internet Access, browser indicates Edge for Business. If both planes are configured, the block observed may not come from the policy under test.

A diagnostic distinction worth internalising: an application that reports no response and produces no traffic log entry was never inspected, which is not the same as a policy that evaluated and allowed. The traffic log separates the two.

Validation evidence - the three logs

For every test, export three logs for the same test window and read them together. Each answers a different question, and only the three together show whether a request was acquired, inspected and classified. Any one of them on its own can mislead, and the exports are the evidence behind each validation result.

Log Question it answers Where
Entra Internet Access traffic logs (Transactions) Did Global Secure Access see the request, how was it encoded, and what did it do with it? Entra admin centre > Global Secure Access > Monitor > Traffic logs > Transactions
DLP policy alerts Did a DLP rule match, and which policy, rule and sensitive information type? Defender portal > Incidents & alerts > Alerts (Microsoft’s recommended location for DLP alerts), or Purview > Data loss prevention > Alerts
DSPM for AI (classic) Activity explorer Did Purview record the AI interaction and the classification, and on which enforcement plane? Purview > DSPM for AI (classic) > Activity explorer

Run one test at a time and note its start and end time. Exports from the three sources are not necessarily in the same time zone - Activity explorer exports are in UTC - so convert before lining entries up.

1. Entra Internet Access traffic logs

  • Set the time range to the test window and filter on the application’s destination FQDN, for example chatgpt.com.
  • Use the Transactions tab. The Connections tab summarises connections and has no per-request detail.
  • Show the destination FQDN, URL, HTTP method, httpRequestContentType, sent bytes, action and policy rule name columns, then export the filtered view.

Find the POST carrying the payload - the one with a non-trivial sent bytes value - and read the content type before the action.

What the log shows What it means
No entry for the application The request was never acquired. Check the Global Secure Access client, the traffic forwarding profile assignment and the QUIC policy.
Allowed, binary content type (e.g. application/connect+proto) The request was acquired but Purview cannot parse the body. A transport limitation, not a policy fault.
Allowed, JSON or form-encoded, no content policy rule The request was readable but not sent for scanning, or Purview returned no verdict. Check the content rule destinations, the Purview adaptive scope and the Microsoft.Purview resource provider.
Blocked by the content policy rule Network-plane DLP enforced the block.
Blocked by a different rule (web filtering, threat intelligence) Another control blocked the request before DLP - the test proves nothing about DLP.

The same data is available through Microsoft Graph (GET /beta/networkAccess/logs/traffic, filtered on createdDateTime and destinationFQDN), but the Graph schema has no request content type field, so the portal export is still needed for that column.

1. Entra Internet Access traffic logs - screenshot 38

2. DLP policy alerts

  • In the Defender portal alert queue, filter the service source to Microsoft Data Loss Prevention and the time range to the test window, then export the list.
  • Open each alert and confirm the policy, rule, sensitive information type (Contoso Project Reference (Demo)), confidence level, user and destination.
  • Network-plane matches should show the location ExtendedApplications.

A block in the traffic log with no alert usually means alerting is turned off on the rule or the alert hasn’t arrived yet - activity can take up to 30 minutes to appear. An alert with no matching block points to a rule in audit mode, or to the browser plane. The AlertInfo / AlertEvidence query in Hunting from Defender XDR returns the same alerts with their evidence.

2. DLP policy alerts - screenshot 39

3. DSPM for AI (classic) Activity explorer

  • Filter on the test window, the test user and the activity (AI interaction and DLP rule matched), then export to CSV.
  • Check the enforcement plane (network rather than browser), the application, the sensitive information type detected and the action taken.
  • Activity explorer holds 30 days of data.

The same data can be exported from Security & Compliance PowerShell:

# Activity explorer export for the test window (UTC). Page through with -PageCookie if LastPage is false.
Connect-IPPSSession
$res = Export-ActivityExplorerData -StartTime (Get-Date '2026-10-17T09:00') -EndTime (Get-Date '2026-10-17T18:00') `
-Filter1 @("Activity", "AIAppInteraction") -PageSize 5000 -OutputFormat Csv
$res.ResultData | Out-File .\activity-explorer-ai.csv
3. DSPM for AI (classic) Activity explorer - screenshot 40

Reading the three together

Traffic log / DLP alert / Activity explorer Conclusion
Blocked by content rule / alert raised / DLP rule matched, plane network Working as designed.
Allowed, binary content type / no alert / AI interaction with no sensitive information type Uninspectable transport - the Claude prompt case.
No entry / no alert / no activity Traffic not acquired - client, forwarding profile or QUIC.
Allowed, JSON / no alert / no activity Scan path not working - content rule destinations, Purview adaptive scope, resource provider, or policy not yet distributed (up to 24 hours).
Allowed / alert raised / DLP rule matched, plane browser An Edge for Business policy acted, not the network policy under test.
Blocked by content rule / no alert / no activity yet Wait 30 minutes and export again before drawing a conclusion.

Keep the three exports together, named with the application and test date, alongside the screenshots for that run. They are the evidence behind each entry in the coverage register.

Hunting from Defender XDR

The Global Secure Access traffic logs are not available in Defender advanced hunting. They live in the Entra admin centre, or are exported through Entra diagnostic settings to Log Analytics, an Event Hub or Microsoft Sentinel. The per-request detail used for the method in the Validation section - content type, action, policy rule name - is only reachable there.

The Purview side is reachable from the Defender portal without a Log Analytics workspace. Three tables are relevant:

Table Carries Caveat
DataSecurityEvents (preview) DlpPolicyMatchInfo, DlpPolicyEnforcementMode, SensitiveInfoTypeInfo, ApplicationNames, TargetUrlDomain Populated by Insider Risk Management; returns nothing unless the organisation has opted in to share insider risk alerts with Defender
CloudAppEvents Audit activity across locations The table Microsoft’s DLP investigation guidance points at
AlertInfo / AlertEvidence DLP alerts and their entities Alert-level only, not per-activity

Whether network-plane events populate these tables is not stated in Microsoft’s documentation. Confirm by querying a known test window rather than assuming coverage.

Discovery queries

Run these first against a window in which blocks are known to have fired. An empty result from DataSecurityEvents usually indicates the Insider Risk Management opt-in rather than a policy problem.

// What data security activity exists, and under which workload?
DataSecurityEvents
| where Timestamp > ago(7d)
| summarize Events = count() by Workload, ActionType, DlpPolicyEnforcementMode
| order by Events desc
// Does anything carry AI app destinations?
DataSecurityEvents
| where Timestamp > ago(7d)
| where isnotempty(TargetUrlDomain) or isnotempty(ApplicationNames)
| project Timestamp, AccountUpn, ApplicationNames, TargetUrlDomain,
ActionType, DlpPolicyEnforcementMode, SensitiveInfoTypeInfo
| order by Timestamp desc

Enforcement and alert queries

// Block actions only. DlpPolicyEnforcementMode: 0 None, 1 Audit, 2 Warn,
// 3 Warn and bypass, 4 Block, 5 Allow
DataSecurityEvents
| where Timestamp > ago(30d)
| where DlpPolicyEnforcementMode == 4
| project Timestamp, AccountUpn, ActionType, ObjectName,
ApplicationNames, TargetUrlDomain, DlpPolicyMatchInfo
| order by Timestamp desc
// Destinations ranked by volume - useful for spotting unsanctioned AI apps in use
DataSecurityEvents
| where Timestamp > ago(30d)
| where isnotempty(TargetUrlDomain)
| summarize Events = count(), Users = dcount(AccountUpn)
by TargetUrlDomain, ActionType
| order by Events desc
// DLP alerts with their evidence
AlertInfo
| where Timestamp > ago(7d)
| where ServiceSource == "Microsoft Data Loss Prevention"
| join kind=inner AlertEvidence on AlertId
| project Timestamp, Title, Severity, EntityType, AccountUpn, RemoteUrl, FileName
| order by Timestamp desc
// Cloud app audit activity for a specific destination
CloudAppEvents
| where Timestamp > ago(7d)
| where AccountDisplayName != ""
| where ApplicationId != 0
| summarize Events = count() by Application, ActionType
| order by Events desc

Column names and permitted values should be confirmed against the tenant before these are used operationally; the schema is in preview and subject to change.

Coverage findings

File uploads were blocked on all six applications tested. Typed and pasted prompts were blocked on five of six - every application except Claude. The variable is the wire format the application uses, not the policy scope.

Tested 17-18 October 2026 against a single Purview DLP policy scoped to all unmanaged AI apps, using one custom sensitive information type, in Edge and Chrome on one managed device. DLP rule settings: High confidence, instance count 1 to Any, action Block.

Application Prompt transport Prompt File upload
ChatGPT application/json to /backend-api/f/conversation Blocked Blocked
Perplexity application/json to /rest/sse/perplexity_ask Blocked Blocked
Claude application/connect+proto to /claudeai-rpc/โ€ฆ Allowed Blocked
Meta AI Not recorded Blocked Blocked
Grok Not recorded Blocked (no response) Blocked
Mistral AI Not recorded Blocked (not accepted) Blocked (not accepted)

Results for Meta AI, Grok and Mistral AI are from the application’s behaviour in the screenshots under Test evidence. Confirm each against the traffic logs and record the request content type, as the validation method requires.

Purview parses JSON, plain text, HTML and XML. ChatGPT and Perplexity submit prompts as JSON, so the payload is classified and the sensitive information type matches. Claude submits prompts as Protocol Buffers over Connect RPC. That payload is binary, Purview cannot read it, and the request passes without evaluation.

Claude is the controlling case, because it demonstrates the mechanism twice within one application: the same policy blocks a Word document containing the sensitive information type, because multipart/form-data can be reassembled and inspected, while permitting the same content typed into the prompt box.

Two secondary observations from the same traffic:

  • Perplexity echoed the sensitive information type into its own analytics telemetry, which was blocked separately. Sensitive data reaching third-party telemetry is a path rarely considered in scoping.
  • Claude produced block events on GET requests retrieving conversation history, where Purview matched text received from the application. Enforcement fired on the response direction while the request direction passed.

Test evidence

Screenshots from the paste and file upload tests, in Edge and Chrome with the custom sensitive information type. A blocked request shows the application’s own error, or no response at all, rather than a Purview message - see Operational considerations.

Perplexity AI - paste

Won’t accept the prompt.

Perplexity AI - paste - screenshot 41

Perplexity AI - file upload

Perplexity AI - file upload - screenshot 42

Meta AI - paste

Meta AI - paste - screenshot 43

Meta AI - file upload

Meta AI - file upload - screenshot 44

Grok - paste

Grok - paste - screenshot 45

No response.

Grok - file upload

File processing failed.

Grok - file upload - screenshot 46

Mistral AI - paste

Won’t accept the paste.

Mistral AI - paste - screenshot 47

Mistral AI - file upload

Won’t accept the upload - no error shown.

Mistral AI - file upload - screenshot 48

Claude - paste

Claude - paste - screenshot 49
Claude - paste - screenshot 50

Claude - file upload

Claude - file upload - screenshot 51

Known limitations and residual risk

Binary prompt transports are not inspected. Any application submitting prompts as Protocol Buffers, gRPC-web or a similar encoding passes without evaluation, regardless of policy scope. There is no console indication that an application falls into this category.

Blocking file upload does not close the prompt path. Where an upload is refused, a user can open the document and paste its contents into the prompt box. On an application with a parseable transport this is still caught. On one with a binary transport it is not: the paste travels the same uninspected path as any typed prompt, whatever its length or origin. This is the most likely real-world bypass, and it requires no technical knowledge - it is the obvious next thing a user tries.

WebSocket support varies. All integrations classify HTTP and HTTPS. WebSocket support differs by solution, so streaming interfaces may fall outside inspection.

Size limits. Purview evaluates up to 4 MB of text and files up to 3 MB. Larger items produce a limit outcome rather than a policy decision. Through Scan with Purview the limit is 3 MB for both text and files, and content that can’t be inspected is allowed (fail-open) - check the PurviewStatus field in the traffic logs.

Protocol constraints. QUIC is unsupported and bypasses the tunnel entirely rather than failing closed - traffic that negotiates HTTP/3 is never seen. TLS inspection does not support HTTP/2 negotiation; sites requiring it will not load.

Scope exclusions. Policies do not apply to B2B guest users.

Certificate chain constraint. If the signing root enforces a path length constraint of 1, the Global Secure Access intermediate cannot be validated beneath it and clients receive certificate errors on every inspected site.

The defensible position for a customer is that file-based exfiltration is covered broadly, prompt-based exfiltration is covered for applications using parseable transports, and the set of covered applications must be established by testing rather than assumed from the category scope.

Operational considerations

User experience differs by plane. The browser plane renders a branded Purview interstitial inside the page. The network plane cannot inject interface elements - it returns an HTTP 403, and the application displays whatever its own error handling produces. In practice this means generic failures: an upload error, a session error, or raw block-page HTML rendered inside the chat window. Service desks should be briefed, because these do not look like policy messages.

Alert volume needs tuning before go-live. Pilot testing by a single user generated 29 low-severity alerts across two days. At production scale, untuned alerting will bury genuine signals.

Re-verification is ongoing, not one-off. An application using JSON today may adopt a binary transport in a future release, silently removing prompt-path coverage. Re-run the validation method after significant vendor changes and on a periodic schedule.

Endpoint prerequisites are the common failure point. Certificate distribution and QUIC policy both depend on correct group membership. Verify on a representative device rather than trusting assignment reporting.

Automation boundaries. Most of the tenant configuration is reproducible through Microsoft Graph beta: traffic forwarding profiles, security profiles and their policy links, TLS inspection policies and rules, Conditional Access, and the Intune profiles. The table shows what stays manual and what the scripts cover:

Element Status Reason
TLS inspection root CA Manual Generated per tenant; cannot be copied between tenants
GSA content policy and its Scan with Purview rule Manual Not exposed in the Graph beta surface
Custom sensitive information type Scripted Import-ContosoSIT.ps1 (Security & Compliance PowerShell)
Purview inline web traffic DLP policy Scripted New-PurviewInlineDlpPolicy.ps1 (Security & Compliance PowerShell, -EnforcementPlanes Network). Pay-as-you-go billing must be set up first
Intune QUIC policy and root CA profile Scripted Deploy-GsaEndpointPrereqs.ps1. Creating and downloading the Microsoft-managed certificate stays manual

The scripts therefore cover the repeatable tenant plumbing; the certificate and the content policy stay manual.

Scripts

The scripts, READMEs and test samples are in the Cloud-Secure.ai GitHub repository. Each script has a README covering prerequisites, parameters, the order of operations and troubleshooting. Import-ContosoSIT.ps1 and New-PurviewInlineDlpPolicy.ps1 were tested end to end in a live tenant; Deploy-GsaEndpointPrereqs.ps1 was tested with -WhatIf only, so run it with -WhatIf first.

Script What it does Further information
Deploy-GsaEndpointPrereqs.ps1 Creates the Intune QUIC block policy for Edge and Chrome and the trusted certificate profile for the TLS inspection root CA. Creating and downloading the Microsoft-managed certificate stays manual (Step 2). Deploy-GsaEndpointPrereqs-README.md
Import-ContosoSIT.ps1 Creates the Contoso Project Reference (Demo) sensitive information type. Create only - never changes an existing type. Import-ContosoSIT-README.md
New-PurviewInlineDlpPolicy.ps1 Creates the inline web traffic DLP policy (All unmanaged AI apps, Network) and its block rule, as in Step 10. Create only. New-PurviewInlineDlpPolicy-README.md

Rolling out to production

The lab proves the mechanism; production needs a staged rollout. This order keeps the risk low and works the same for one tenant or many.

  1. Pilot with IT first. Keep the device and user groups small, and confirm the root CA and QUIC policy on every pilot device before adding its user to the Conditional Access policy.
  2. Start the DLP policy in simulation mode. Choose simulation as the policy mode (or -Mode TestWithNotifications in the script), review matches in Activity explorer and the alert queue for a week, then turn it on.
  3. Prove each AI app your users actually use with the Validation method, and record the result and content type in the coverage register.
  4. Brief the service desk. Blocks appear as the application’s own errors, not as a Purview message.
  5. Tune alerting before widening the groups, so genuine matches are not buried.
  6. Widen in stages, root CA and QUIC policy first, then users.
  7. Know the rollback. Turning off the Conditional Access policy removes the security profile, so TLS inspection and Scan with Purview stop for those users. Setting the DLP policy back to simulation stops blocking but keeps the visibility.

Key takeaways

  • File uploads were blocked on all six AI applications tested. Prompt blocking depends on how each application sends data: JSON is inspected, binary formats such as Claude’s prompts pass.
  • Order matters: the root CA must be on devices before TLS inspection is switched on.
  • Group membership is the most common failure, and Intune does not flag an empty group.
  • Coverage has to be proven per application, with the traffic log content type as evidence, and re-tested when vendors change their apps.
  • B2B guest users are out of scope.
  • Scan with Purview is in preview at the time of writing; check its status before presenting it as generally available.

Reference

Supporting detail for the implementation: the Microsoft Graph beta endpoints and limits confirmed in testing, the coverage register for the generative AI applications tested, and the Microsoft documentation referred to throughout.

Microsoft Graph beta endpoints and limits

Confirmed Graph beta endpoints

Verified against a live tenant. All are under https://graph.microsoft.com/beta/.

Endpoint Returns
networkAccess/tenantStatus Onboarding state
networkAccess/settings/conditionalAccess Signalling status and options
networkAccess/settings/crossTenantAccess Packet tagging settings
networkAccess/forwardingProfiles?$expand=policies Traffic forwarding profiles and assignments
networkAccess/filteringProfiles?$expand=policies Security profiles and policy links
networkAccess/filteringPolicies?$expand=policyRules Web content filtering policies
networkAccess/cloudFirewallPolicies?$expand=policyRules Cloud firewall policies
networkAccess/tlsInspectionPolicies?$expand=policyRules TLS inspection policies and rules
networkAccess/connectivity/remoteNetworks Remote networks
networkAccess/connectivity/branches Branches

networkAccess/settings returns 404. networkAccess/contentPolicies and networkAccess/tls return 400 under every spelling tested; neither the content policy nor the TLS inspection certificate settings appear to be exposed.

networkAccess/tls/externalCertificateAuthorityCertificates returns 200 with an empty list while a Microsoft-managed certificate is Active. It only holds own-PKI (CSR) certificates, so Microsoft-managed certificates can’t be read or created through Graph.

Inline evaluation limits

Item Limit
Text (upload and download) 4 MB
Files (upload and download) 3 MB
Policy distribution Up to 24 hours
Activity and audit visibility Up to 30 minutes

Supported activities

Four activities are available in both collection and DLP policies: text sent to or shared with a cloud or AI app; text received from a cloud or AI app; files uploaded to or shared with a cloud or AI app; files downloaded from a cloud or AI app. Actions are limited to audit only and block.

Generative AI application coverage register

This register records the six applications tested: ChatGPT, Perplexity, Claude, Meta AI, Grok and Mistral AI. Test any other application before claiming coverage for it. Do not record results from assumption - the point of the validation method is that transport behaviour cannot be inferred from the vendor, the category scope, or from how a similar product behaves.

The Edge list column records whether Microsoft documents the application as a supported unmanaged cloud app for browser-plane DLP in Edge for Business. It is a documented fact, not a test result, and it says nothing about network-plane coverage.

Application Edge list Prompt - content type Prompt - result Upload - content type Upload - result
ChatGPT (consumer) Yes application/json Blocked multipart/form-data Blocked
Perplexity AI Yes application/json Blocked multipart/form-data Blocked
Claude No application/connect+proto Allowed multipart/form-data Blocked
Grok (xAI) Yes Blocked (no response) Blocked
Meta AI Yes Blocked Blocked
Mistral AI Blocked (not accepted) Blocked (not accepted)

Running each test

Two tests per application, both in Edge and Chrome, signed in, with the same sensitive information type.

  1. Paste test. Paste the sensitive string into the prompt box and submit. Record the result.
  1. Upload test. Attach a document containing the same value, under 3 MB, with the value in the document body. Record the result.

After each pair, open the traffic logs Transactions tab, filter to the application host, and read httpRequestContentType on the request carrying the payload. Record that value whether the test blocked or passed - the transport is the finding, and without it a later regression cannot be explained.

Use Blocked, Allowed or Inconclusive in the result columns. Inconclusive covers the case where the application failed for its own reasons, no traffic log entry appeared, or another control intervened; re-run rather than recording a pass.

Pasting the contents of a document into the prompt box is not recorded separately. It travels the same path as any typed prompt, so its outcome always matches the paste test rather than the upload test. That equivalence is the point worth demonstrating to a customer, not a third data point.

Keep the date of each test and the supporting screenshots alongside this table. Vendors change encodings without notice, and a result without a date cannot be trusted six months later.

Microsoft notes that some applications, naming ChatGPT, Runway and Meta AI, intermittently send content in encoded form or through dynamically generated endpoints, which can affect policy enforcement. Treat that as a reason to test repeatedly rather than once.

Why Claude behaves differently

Claude is not inherently exempt from the policy. The adaptive scope covers it, Purview evaluates its traffic, and file uploads are blocked. The difference is confined to the prompt submission path.

The mechanism is the encoding of the request body:

  • ChatGPT posts the prompt to /backend-api/f/conversation as application/json. Purview parses JSON, reads the prompt text, matches the sensitive information type, and the request is blocked.
  • Perplexity posts to /rest/sse/perplexity_ask as application/json, with the same outcome.
  • Claude posts to /claudeai-rpc/โ€ฆ as application/connect+proto - Protocol Buffers carried over Connect RPC. The body is a binary serialisation with no readable text, so classification finds nothing to match and the request is allowed.

The content types a Purview content rule can inspect are JSON, plain text, HTML and XML for text, plus the listed file formats. A protobuf body falls outside all of them. This is a parsing limitation, not a policy misconfiguration, and nothing in the Purview or Global Secure Access interface indicates that an application falls into this category.

The same application demonstrates both behaviours, which is why it is the useful test case: a Word document carrying the identical sensitive information type is blocked, because multipart/form-data can be reassembled and the document parsed. One policy, one sensitive information type, one application, two outcomes decided solely by wire format.

Testing further applications

For each application added to the register:

  1. Confirm it loads and a benign prompt succeeds, ruling out an unrelated block from another control.
  1. Submit the sensitive information type as a typed prompt.
  1. Upload a document containing the same value.
  1. Paste the document’s contents into the prompt box.
  1. Read httpRequestContentType on the request carrying the payload from the traffic logs Transactions tab, and record it alongside the action.

Record the transport even where the result is a block. When a vendor changes encoding in a later release, the recorded baseline is what makes the regression visible.

Microsoft documentation

Microsoft documentation and announcements referred to in this post. Several features are in preview and the pages change often - check the date on each page.

Microsoft Purview

Global Secure Access and Entra Internet Access

Microsoft Graph

Intune

PowerShell

Microsoft 365 message centre


Disclaimer: Scan with Purview is in preview at the time of writing, so verify current availability in your own tenant before planning a deployment. Everything in this post was tested in a dedicated lab tenant in October 2026. The test scenarios are entirely my own and are no reflection on the generative AI providers named. The views in this post are my own and are accurate at the time of writing. Microsoft’s protections and the generative AI vendors’ own protections may change.

Seรกn O’Farrell | Cloud-Secure.ai

Microsoft Defender AI agent runtime protection: finding the agents you did not know you had (part 3)

Microsoft Defender AI agent runtime protection, part 3: finding the agents you did not know you had

Series: Part 1 introduced AI agent runtime protection in Microsoft Defender for Endpoint. Part 2 covered the lab build and validation. Part 3 goes back a step to the question that should come first: what is actually running on your endpoints?

Every organisation I work with has more AI agents running on its endpoints than it thinks it has. Not Copilot Studio agents, not Foundry agents, not anything that went near an architecture review. Developer tooling: Claude Code, the VS Code Claude Code extension, GitHub Copilot CLI, ChatGPT Desktop, Antigravity CLI. Installed by individuals, on managed laptops, with the full rights of the signed-in user, talking to MCP servers nobody has catalogued.

The Local agents tab in Microsoft Defender is the first Microsoft capability that gives you a straight answer to the question “what is actually running?”. This post covers what the view shows, how to get the data out of it, a set of advanced hunting queries that go well beyond what the portal surfaces, and – the part that matters – what you can actually do about what you find.

Part 1 of this series covered what AI agent runtime protection is and how it detects prompt injection against local agents. Part 2 covered the lab build and the validation work behind it. Both assumed you already knew which agents you were protecting. This part fills that gap, and in a real deployment it is the step that comes first.

Where the data comes from

Local agent discovery lives in the Defender portal under Assets > AI agents, on the Local agents tab. The Agents tab beside it covers cloud-hosted agents from Copilot Studio, Microsoft Foundry and Microsoft 365. Local agents are a separate pipeline and a separate onboarding story.

The mechanism is worth understanding, because it drives how you interpret the numbers:

  • Discovery is delivered by Microsoft Defender Antivirus, not by a separate agent, a script or a connector. There is nothing to deploy.
  • It is activity based, not installation based. An agent that is installed but has not run will not appear. The inventory answers “what has been used”, which is the more useful question, but it means the count climbs over time rather than landing fully formed.
  • Each row is one agent installation, scoped to a device and an account. The same agent on three devices is three rows. Two accounts on one device is two rows. The row count is not the agent count.

Prerequisites

  • Defender for Endpoint Plan 2, commercial cloud only. Sovereign and national clouds are not supported.
  • Devices onboarded to Defender for Endpoint, running a supported Windows or macOS build. macOS discovery is in preview.
  • Defender Antivirus in active mode with real-time protection enabled. Passive mode will not give you this.
  • Current monthly platform and engine updates.

The licensing split that catches people out

The inventory and the risk assessment are licensed separately, and this is the single most important thing to flag to a client before they go looking:

Capability Licence required
Discover agents, view the inventory, agent details, device and account, configured MCP servers Defender for Endpoint Plan 2
Query agents in advanced hunting, including the AgentsInfo table Defender for Endpoint Plan 2
Risk level, Risk indicators and security recommendations Microsoft 365 E7, or Microsoft Agent 365 with Defender for Endpoint Plan 2

An E5 tenant gets the inventory and the hunting table. The Risk level column that the view is built around needs E7 or Agent 365. Worth confirming against your own licence position before you build a report that depends on it.

Reading the Local agents view

Here is the tab in a tenant with nineteen agents discovered. Device names, device IDs, account names and account domains are redacted throughout – the blanked columns are deliberate, not a rendering fault.

The Local agents tab in the Microsoft Defender portal, showing discovered AI agents with device and account columns redacted

Agents insights

Three cards sit across the top: Total monitored agents, Agents at High Risk Level and Critical agents, each over a seven day window with a trend. In the Contoso tenant above that reads 19 monitored agents, up 27 per cent, with 4 at high risk, up 300 per cent, and no critical agents.

The 300 per cent jump is the useful signal, and it is also the trap. On an activity-based inventory, a week-on-week rise usually means discovery is still catching up rather than that four new risky agents appeared on Tuesday. Treat the first three to four weeks after enablement as a baselining period and do not report the trend to a steering group until it settles.

Columns

The default view gives you Agent name, Version, Device name, Device ID, OS platform, Device type, Account name, Account domain, Risk level, Risk indicators and Recommendations. Customize columns adds MCP servers, Local MCPs and First seen, and First seen is the one I always add – it is what turns the inventory into a timeline.

Filters are available on every column in the filter set, and Risk level is the obvious one to start with. Export writes the filtered list out, so the workflow for a client report is: filter to High, export, and work the resulting list. That is a perfectly good starting point. It is also where the portal stops being enough.

Making sense of the risk level

The Risk level column is the most valuable thing on this page and the most commonly misread. It is not a score for the agent as a product. It is a calculated view of this installation, of this agent, on this device, under this account, and the same agent will carry different risk levels on different rows for exactly that reason.

Defender derives it from the agent’s active risk indicators, weighing both the severity of each indicator and the combination of indicators present. Indicators that are inactive, or that could not be assessed because the supporting data was not available, do not contribute. The levels are:

Risk level What it means
High A serious combination of active indicators. Prioritise for review.
Medium Notable risk. Review and mitigate.
Low Minor active risk.
No known risk Assessed, with no active risk indicators found.
Not evaluated Not enough information to assess. This is a visibility gap, not a clean bill of health.

Not evaluated is the row people skip past. It means Defender could not gather enough about that agent to judge it, which on an activity-based inventory usually means it has only just been seen. Keep it on the list rather than filtering it out.

The indicators behind the level

Indicators come from the agent’s configuration, the tools and data it can reach, its runtime activity, the endpoint and user context around it, and any active alerts. Not every indicator applies to every platform. The ones you will see across agent types include:

  • Weak Instructions – the agent’s instructions do not give it enough guidance for safe, predictable behaviour.
  • High-usage Agent – used by multiple users, and likely to matter to business operations.
  • Indirect Prompt Injection Exposure – the agent may be exposed to indirect prompt injection. This is the indicator that ties the inventory directly to the runtime protection work in Parts 1 and 2.
  • Privileged Business-system Access – the agent has write access to key business systems.
  • Active Threat – there are active security alerts associated with the agent.

For local agents specifically, the context around the agent does most of the work:

  • Used by a critical user – the agent is associated with a user flagged as critical.
  • Running on a critical device – the agent is running on a device flagged as critical.
  • Running on a device with vulnerabilities – the host has known vulnerabilities.
  • Privileged Software Development Access – the agent can reach software development systems.

Those labels are what the portal renders. The underlying data uses different names, and the mapping is not documented anywhere, so here it is:

Property on the exposure graph node Portal label
agentOnCriticalDeviceIndicator Running on a Critical Device
agentOnVulnerableDeviceIndicator Running on a Device with Vulnerabilities
agentLinkedToCriticalUserIndicator Used by a Critical User
publishedAgentIndicator Publish status, applies to cloud agents rather than local ones

Each indicator is a separate property on the agent’s exposure graph node, sitting beside the aiAgentMetadata bag – not an array of indicator objects, which is the first thing most people reach for. Query 12 below puts them to work. If your tenant shows an indicator that is not in that table, query 12’s lead-in shows how to enumerate the full set.

One more thing the data makes obvious: an agent whose account could not be resolved cannot be assessed for the user-context indicators at all. If you see rows with a blank account name in the inventory, expect them to sit at Not evaluated or to carry a lower level than they deserve.

That last group is the point. A local agent inherits the identity and the access rights of the person running it, and it typically runs with broad permissions on the endpoint. The agent binary is rarely what makes a row High. Who is running it, and on what, usually is.

What that means for the four High rows

In the Contoso tenant in the screenshot above, the High rows are coding agents – two Claude Code installations, a VS Code extension and a desktop assistant – sitting under developer accounts. None of those tools is inherently more dangerous than the Medium rows below them. They rank higher because of the accounts and devices they are attached to, and because a coding agent reaching development systems picks up the privileged development access indicator that a general assistant does not.

Select a row and the Risk section of the flyout shows the indicators behind its level. Below are two agents from the same tenant: first a High one – running on a critical device, on a device with vulnerabilities, used by a critical user and by a privileged user – and then a Medium one, carrying two of the same indicators but neither of the two user-privilege ones.

Defender agent flyout showing a High risk level with four risk indicators
Defender agent flyout showing a Medium risk level with two risk indicators

Side by side those two make the calculation obvious. The difference between Medium and High here is not the agent and not the device – it is the account. Add the critical user and the privileged user indicators on top of the device context and the level moves up. That is the single most useful thing to understand about this column, and it is why query 14 groups by account rather than by agent.

Note also that Used by a privileged user appears on the High flyout and is not in the documented indicator set, which is a reminder that the published list is not complete and your tenant is the authority.

The practical read is that a High here is an instruction to look at the combination, not to go and uninstall the agent. Two questions answer most of them: does this person need this agent on this device, and is this device inside the runtime protection scope yet? Query 8 answers the first half properly by ranking on asset criticality, and query 11 answers the second.

Be careful about one trap. Some indicators cannot be remediated at all, because they describe the agent working as intended – an agent that needs access to critical systems is going to carry that indicator permanently. Those are there for prioritisation, not as a defect list. Chasing them to zero is wasted effort.

And remember that this whole column is the part of the page that needs Microsoft 365 E7 or Agent 365. On a plain E5 tenant you still get the inventory, but every row will be blank here and you will be prioritising from the hunting queries instead.

Why the export is not the end of the job

The export gives you the rows as displayed. It will not tell you which agents auto-approve their own actions, which are running under an untrusted host process, which MCP servers they are wired into, or which of those MCP endpoints are remote. For a real assessment you need advanced hunting.

Advanced hunting: a schema reality check first

Local agents land in the AgentsInfo table, which replaced AIAgentsInfo. Before you write anything against it, three things will save you half an hour:

  1. The published schema and what the tenant serves do not currently line up. The Learn schema page documents an AgentName column. The tenants I have worked in serve the agent display name as Name. Run a bare AgentsInfo | take 1 and confirm against your own tenant before you trust any query, mine included.
  2. There is no DeviceName column. For local agents the device and account context is nested inside RawAgentInfo.localAgentMetadata, and you have to extend it out.
  3. The table holds multiple snapshots per agent. Without an arg_max you will count the same agent many times over. Every query below deduplicates.

Two more gotchas worth having in your head: trustedProcess and autoApprove come through as strings, so compare them against "true" and "false" rather than casting with tobool(). And AgentId is a guid in AgentsInfo but a string in the exposure graph, so wrap both sides in tostring() when you join.

Filter every local agent query with Platform == "LocalAgents". Without it you are querying the cloud agent estate as well.

The query set

Run these in the Defender portal under Investigation & response > Hunting > Advanced hunting. Microsoft also ships prebuilt queries in the AI Agents folder on the Queries tab, which are worth reading before you write your own. Each query repeats whatever let statements it needs, so any one of them can be pasted in and run on its own.

1. Current local agent inventory

The baseline. One row per agent, latest snapshot, with retired entries dropped. Everything else builds on this shape.

AgentsInfo
| where Platform == "LocalAgents"
| summarize arg_max(Timestamp, *) by AgentId
| where LifecycleStatus !in~ ("Deleted", "Uninstalled")
| project LastSeen = Timestamp, Agent = Name, Version, AgentId, LifecycleStatus
| order by Agent asc

2. Device and account context

Unpacks the nested local agent metadata so you get the device and user behind each row – the columns the portal shows but the table does not expose directly.

AgentsInfo
| where Platform == "LocalAgents"
| summarize arg_max(Timestamp, *) by AgentId
| where LifecycleStatus !in~ ("Deleted", "Uninstalled")
| extend Meta = RawAgentInfo.localAgentMetadata
| extend Device = tostring(Meta.deviceName),
         Account = tostring(Meta.accountName),
         HostProcess = tostring(Meta.hostProcess),
         AutoApprove = tostring(Meta.autoApprove),
         TrustedProcess = tostring(Meta.trustedProcess)
| project LastSeen = Timestamp, Agent = Name, Version, Device, Account,
          HostProcess, AutoApprove, TrustedProcess
| order by Device asc, Agent asc

3. Risky configuration: auto-approve and untrusted host processes

This is the query that earns its keep. An agent that auto-approves its own actions has no human in the loop, and an untrusted host process means the binary driving the agent is not one Defender recognises. Either on its own is worth a conversation. Together they are a finding.

AgentsInfo
| where Platform == "LocalAgents"
| summarize arg_max(Timestamp, *) by AgentId
| where LifecycleStatus !in~ ("Deleted", "Uninstalled")
| extend Meta = RawAgentInfo.localAgentMetadata
| extend AutoApprove = tostring(Meta.autoApprove),
         TrustedProcess = tostring(Meta.trustedProcess),
         Device = tostring(Meta.deviceName),
         Account = tostring(Meta.accountName)
| where AutoApprove =~ "true" or TrustedProcess =~ "false"
| project Agent = Name, Version, Device, Account, AutoApprove,
          TrustedProcess, LastSeen = Timestamp
| order by AutoApprove desc, Agent asc

4. Agent sprawl: how many devices per agent

Turns the row count into something you can take to a steering group. Ten rows of Claude Code across eight devices and six accounts is a different story to ten rows on one developer’s machine.

AgentsInfo
| where Platform == "LocalAgents"
| summarize arg_max(Timestamp, *) by AgentId
| where LifecycleStatus !in~ ("Deleted", "Uninstalled")
| extend Meta = RawAgentInfo.localAgentMetadata
| extend Device = tostring(Meta.deviceName), Account = tostring(Meta.accountName)
| summarize Installs = count(),
            Devices = dcount(Device),
            Accounts = dcount(Account),
            Versions = make_set(Version, 20)
  by Agent = Name
| order by Installs desc

5. Version drift

AI agent tooling updates weekly and users update it themselves. Anything with a long tail of versions is a patching conversation you are not currently having, because none of this is in your software inventory.

AgentsInfo
| where Platform == "LocalAgents"
| summarize arg_max(Timestamp, *) by AgentId
| where LifecycleStatus !in~ ("Deleted", "Uninstalled")
| summarize VersionCount = dcount(Version),
            Versions = make_set(Version, 50),
            Installs = count()
  by Agent = Name
| where VersionCount > 1
| order by VersionCount desc

6. Newly seen agents in the last seven days

Your shadow AI early warning. Run it weekly, or wrap it in a scheduled hunt. Note that this finds agents whose first snapshot falls inside the window, so during the initial baselining period it will be noisy.

let Window = 7d;
AgentsInfo
| where Platform == "LocalAgents"
| summarize FirstSeen = min(Timestamp), LastSeen = max(Timestamp),
            Agent = any(Name), Version = anyif(Version, isnotempty(Version))
  by AgentId
| where FirstSeen > ago(Window)
| project FirstSeen, LastSeen, Agent, Version, AgentId
| order by FirstSeen desc

7. MCP servers and declared tools

The MCP server list is the part of this inventory most people have not thought about. An agent is only as contained as the tools it can reach, and a remote MCP endpoint is an egress path that never went through a firewall review.

AgentsInfo
| where Platform == "LocalAgents"
| summarize arg_max(Timestamp, *) by AgentId
| where LifecycleStatus !in~ ("Deleted", "Uninstalled")
| extend Meta = RawAgentInfo.localAgentMetadata
| extend Device = tostring(Meta.deviceName), Account = tostring(Meta.accountName)
| mv-expand Server = McpServers
| extend ServerName = tostring(Server.name),
         ServerType = tostring(Server.type),
         Endpoint   = tostring(Server.url)
| where isnotempty(ServerName)
| project Agent = Name, Device, Account, ServerName, ServerType, Endpoint
| order by ServerType asc, ServerName asc

8. Agents on critical devices

Joins the inventory to the exposure graph so you can rank by business impact rather than by agent risk alone. Asset criticality runs 0 for very high through 3 for low. Note that the graph calls the agent identifier id inside aiAgentMetadata.

let LocalAgentNodes =
    ExposureGraphNodes
    | where NodeLabel == "ai-agent"
    | where tostring(NodeProperties.rawData.aiAgentMetadata.platform) == "LocalAgents"
    | extend AgentKey = tostring(NodeProperties.rawData.aiAgentMetadata.id)
    | project AgentNodeId = NodeId, AgentKey, AgentDisplayName = NodeName;
let DeviceNodes =
    ExposureGraphNodes
    | where NodeLabel in ("device", "microsoft.compute/virtualmachines")
    | extend Criticality = toint(NodeProperties.rawData.criticalityLevel.criticalityLevel)
    | where isnotnull(Criticality) and Criticality <= 1
    | project DeviceNodeId = NodeId, DeviceNodeName = NodeName, Criticality;
ExposureGraphEdges
| where EdgeLabel in ("runs on", "installed on")
| join kind=inner LocalAgentNodes on $left.SourceNodeId == $right.AgentNodeId
| join kind=inner DeviceNodes on $left.TargetNodeId == $right.DeviceNodeId
| project Agent = AgentDisplayName, Device = DeviceNodeName, Criticality, AgentKey
| order by Criticality asc, Agent asc

9. Prompt injection alerts raised against local agents

Once runtime protection is on, this is the detection to watch. Severity is Informational while you are in audit mode and moves to a real severity in block mode, so filter on title rather than severity during a pilot.

AlertInfo
| where Timestamp > ago(30d)
| where Title has_any ("prompt injection", "AI agent", "jailbreak")
| join kind=leftouter (
    AlertEvidence
    | project AlertId, EntityType, DeviceName, AccountName, FileName, ProcessCommandLine
) on AlertId
| project Timestamp, Title, Severity, Category, DeviceName, AccountName,
          EntityType, FileName, AlertId
| order by Timestamp desc

10. Runtime protection audit and block events

Audit and block events from real-time protection are recorded as behaviours, which is where you go to see what block mode would have stopped before you turn block mode on.

BehaviorInfo
| where Timestamp > ago(30d)
| where Categories has_any ("AI", "Agent") or Description has "agent"
| join kind=leftouter (
    BehaviorEntities
    | project BehaviorId, EntityType, DeviceName, AccountName, ProcessCommandLine
) on BehaviorId
| project Timestamp, ActionType, Description, DeviceName, AccountName, BehaviorId
| order by Timestamp desc

11. Agents whose devices are not covered by runtime protection

The gap analysis. There is no single column that gives you this, so build it from the agent inventory and the set of devices you have targeted with the runtime protection policy, exported from the policy assignment. Swap the let for your own device group logic.

let ProtectedDevices = dynamic(["lap-0001", "lap-0002"]);  // from policy assignment
AgentsInfo
| where Platform == "LocalAgents"
| summarize arg_max(Timestamp, *) by AgentId
| where LifecycleStatus !in~ ("Deleted", "Uninstalled")
| extend Device = tostring(RawAgentInfo.localAgentMetadata.deviceName)
| where Device !in~ (ProtectedDevices)
| summarize Agents = make_set(Name, 20), AgentCount = dcount(AgentId) by Device
| order by AgentCount desc

Risk indicators in advanced hunting

The Risk indicators column is the most useful thing in the portal and the most awkward to get at in hunting, because the indicators are not where you would expect them. They are not an array of indicator objects you can mv-expand. Each one is a separate boolean property hanging directly off the agent’s exposure graph node. If you go looking for a riskIndicators collection you will get a single empty row back and conclude the data is not there.

To enumerate what your own tenant is using, read the keys rather than the values:

ExposureGraphNodes
| where NodeLabel == "ai-agent"
| mv-apply K = bag_keys(NodeProperties.rawData) on (project Key = tostring(K))
| summarize Nodes = dcount(NodeId), Agents = make_set(NodeName, 3) by Key
| order by Nodes desc

Anything ending in Indicator is a risk indicator. Run that first, because the set grows during preview and the portal labels do not appear in the data at all – searching the raw JSON for “Critical Device” returns nothing.

12. Agents, devices, accounts and their risk indicators

The query the portal export cannot give you: every local agent with its device, account, host process and the indicators driving its risk level. Note the join key – the graph calls the agent identifier id inside aiAgentMetadata, while AgentsInfo calls it AgentId, and it is a guid on one side and a string on the other.

let LocalAgentNodes =
    ExposureGraphNodes
    | where NodeLabel == "ai-agent"
    | extend Meta = NodeProperties.rawData.aiAgentMetadata
    | where tostring(Meta.platform) == "LocalAgents"
    | extend Raw = NodeProperties.rawData
    | extend
        OnCriticalDevice     = tostring(Raw.agentOnCriticalDeviceIndicator) has "true",
        OnVulnerableDevice   = tostring(Raw.agentOnVulnerableDeviceIndicator) has "true",
        LinkedToCriticalUser = tostring(Raw.agentLinkedToCriticalUserIndicator) has "true"
    | project AgentKey = tostring(Meta.id),
              ProcessName = tostring(Meta.processName),
              OnCriticalDevice, OnVulnerableDevice, LinkedToCriticalUser;
let LocalAgentInventory =
    AgentsInfo
    | where Platform == "LocalAgents"
    | summarize arg_max(Timestamp, *) by AgentId
    | where LifecycleStatus !in~ ("Deleted", "Uninstalled")
    | extend AgentMeta = RawAgentInfo.localAgentMetadata
    | project AgentKey = tostring(AgentId), Agent = Name, Version,
              Device  = tostring(AgentMeta.deviceName),
              Account = tostring(AgentMeta.accountName),
              LastSeen = Timestamp;
LocalAgentInventory
| join kind=leftouter LocalAgentNodes on AgentKey
| extend IndicatorCount = toint(OnCriticalDevice) + toint(OnVulnerableDevice)
                        + toint(LinkedToCriticalUser)
| extend Indicators = trim(" ", strcat(
      iff(OnCriticalDevice,     "CriticalDevice ", ""),
      iff(OnVulnerableDevice,   "VulnerableDevice ", ""),
      iff(LinkedToCriticalUser, "CriticalUser ", "")))
| extend Indicators = iff(isempty(Indicators), "None", Indicators)
| project Agent, Version, Device, Account, ProcessName, Indicators, IndicatorCount,
          OnCriticalDevice, OnVulnerableDevice, LinkedToCriticalUser, LastSeen
| order by IndicatorCount desc, Device asc, Agent asc

13. Which indicator combinations actually occur

Rolls the detail up into the combinations present in your estate. This is the view that tells you whether High is being driven by device context, user context, or the two together, and it is not available anywhere in the portal.

let LocalAgentNodes =
    ExposureGraphNodes
    | where NodeLabel == "ai-agent"
    | extend Meta = NodeProperties.rawData.aiAgentMetadata
    | where tostring(Meta.platform) == "LocalAgents"
    | extend Raw = NodeProperties.rawData
    | extend
        OnCriticalDevice     = tostring(Raw.agentOnCriticalDeviceIndicator) has "true",
        OnVulnerableDevice   = tostring(Raw.agentOnVulnerableDeviceIndicator) has "true",
        LinkedToCriticalUser = tostring(Raw.agentLinkedToCriticalUserIndicator) has "true"
    | project AgentKey = tostring(Meta.id),
              ProcessName = tostring(Meta.processName),
              OnCriticalDevice, OnVulnerableDevice, LinkedToCriticalUser;
let LocalAgentInventory =
    AgentsInfo
    | where Platform == "LocalAgents"
    | summarize arg_max(Timestamp, *) by AgentId
    | where LifecycleStatus !in~ ("Deleted", "Uninstalled")
    | extend AgentMeta = RawAgentInfo.localAgentMetadata
    | project AgentKey = tostring(AgentId), Agent = Name, Version,
              Device  = tostring(AgentMeta.deviceName),
              Account = tostring(AgentMeta.accountName),
              LastSeen = Timestamp;
LocalAgentInventory
| join kind=inner LocalAgentNodes on AgentKey
| extend Indicators = trim(" ", strcat(
      iff(OnCriticalDevice,     "CriticalDevice ", ""),
      iff(OnVulnerableDevice,   "VulnerableDevice ", ""),
      iff(LinkedToCriticalUser, "CriticalUser ", "")))
| extend Indicators = iff(isempty(Indicators), "None", Indicators)
| summarize Agents  = count(),
            Devices = dcount(Device),
            Users   = dcount(Account),
            AgentNames = make_set(Agent, 5)
  by Indicators
| order by Agents desc

14. Where the exposure is concentrated, by user

The one to lead a client conversation with. Local agents inherit the identity of the person running them, so the useful unit of analysis is the person, not the agent. This also builds the list you need for the runtime protection device group.

let LocalAgentNodes =
    ExposureGraphNodes
    | where NodeLabel == "ai-agent"
    | extend Meta = NodeProperties.rawData.aiAgentMetadata
    | where tostring(Meta.platform) == "LocalAgents"
    | extend Raw = NodeProperties.rawData
    | extend
        OnCriticalDevice     = tostring(Raw.agentOnCriticalDeviceIndicator) has "true",
        OnVulnerableDevice   = tostring(Raw.agentOnVulnerableDeviceIndicator) has "true",
        LinkedToCriticalUser = tostring(Raw.agentLinkedToCriticalUserIndicator) has "true"
    | project AgentKey = tostring(Meta.id),
              ProcessName = tostring(Meta.processName),
              OnCriticalDevice, OnVulnerableDevice, LinkedToCriticalUser;
let LocalAgentInventory =
    AgentsInfo
    | where Platform == "LocalAgents"
    | summarize arg_max(Timestamp, *) by AgentId
    | where LifecycleStatus !in~ ("Deleted", "Uninstalled")
    | extend AgentMeta = RawAgentInfo.localAgentMetadata
    | project AgentKey = tostring(AgentId), Agent = Name, Version,
              Device  = tostring(AgentMeta.deviceName),
              Account = tostring(AgentMeta.accountName),
              LastSeen = Timestamp;
LocalAgentInventory
| join kind=inner LocalAgentNodes on AgentKey
| summarize Agents = dcount(AgentKey),
            Devices = dcount(Device),
            AgentNames = make_set(Agent, 10),
            CriticalDeviceAgents = countif(OnCriticalDevice),
            VulnerableDeviceAgents = countif(OnVulnerableDevice),
            IsCriticalUser = countif(LinkedToCriticalUser) > 0
  by Account
| order by CriticalDeviceAgents desc, Agents desc

What you can actually do from the portal

This is the question every client asks within about ninety seconds of seeing the inventory, and it deserves a straight answer. There is no “block this agent” button on an agent row. Discovery and posture are read paths. The enforcement lives in capabilities you already own, pointed at what discovery found.

1. AI agent runtime protection, in audit then block

This is the primary control, and it is the subject of Parts 1 and 2 of this series, so I will keep it short here. It detects prompt injection in content that local agents read, at the device level, through two mechanisms:

  • Agent-native event inspection (AiAgentProtection) for agents that expose a vendor-supported event interface.
  • Network inspection (AiAgentNetworkInspection) for agents that do not.

Both take Disabled, Audit or Block. In audit the agent action still runs and you get an informational Suspicious AI prompt injection alert. In block the action is stopped before it executes, the agent terminal tells the user what was blocked and why, and the alert carries a real severity.

Deploy it from Endpoints > Configuration management > Endpoint security policies > Windows policies > Create new policy, using the Microsoft Defender AI agent runtime protection template. That template covers agent-native inspection only. Network inspection currently needs a PowerShell platform script running in system context:

Set-MpPreference -AiAgentNetworkInspection Audit

# verify on a device
Get-MpPreference | Select-Object AiAgentProtection, AiAgentNetworkInspection
Get-MpComputerStatus | Select-Object AntivirusSignatureVersion

Targeting is by group, and the group has to contain devices. In Intune you assign the policy to a device group. For devices managed through Defender security settings management you assign it to an Entra ID security group whose members are the devices themselves. There is no user targeting.

That constraint matters more here than it does for most endpoint policies, because the exposure sits with a handful of developers rather than with any device collection you already maintain. Query 2 gives you the device and account pairs behind every discovered agent, which is the list to build the security group from.

Signature version 1.451.224.0 or later is required, and during preview test devices should sit on the Beta channel for Defender updates.

2. Security recommendations on the agent page

Open Agent page gives you a Security recommendations tab with the description, evidence, remediation steps and the affected agents for each finding, and each recommendation is mapped to the risk indicators it reduces. These are posture fixes rather than enforcement, but they are the prioritised work list and they are the one place the product tells you what “good” looks like.

Recommendations are calculated separately from the risk level, so a High agent may have none and a Medium one may have several. Do not use recommendation count as a proxy for risk.

3. The attack surface map and Go hunt

From the agent flyout, View on map puts the agent in the exposure graph alongside the devices, identities and resources it touches, and Go hunt drops you into advanced hunting pre-scoped to that agent. For an agent on a critical device the map is the fastest way to show a client what the blast radius actually is.

4. Standard Defender response, once an alert fires

Agent detections correlate into incidents like anything else, which means the full device-level response surface applies: isolate device, run antivirus scan, collect investigation package, restrict app execution, initiate automated investigation, and live response for anything bespoke. The agent is a process running as the user, so everything you would do to contain a compromised user session applies unchanged.

5. The controls that are not in the AI agents page at all

If the decision is that a given agent should not be running in the estate, discovery gives you the target list and the enforcement comes from elsewhere:

  • App control (WDAC) or AppLocker to stop the binary executing, and Restrict app execution as a per-device containment action.
  • Network protection and custom indicators to block specific remote MCP endpoints once you have the URLs from query 7.
  • Web content filtering to put the AI category on a monitored or blocked footing.
  • Conditional Access and app governance for anything that authenticates with a work identity, which is the Agent 365 and Entra Agent ID story rather than the local agent one.

Be honest with clients about where the line sits. Defender will tell you what is running, tell you what is risky about it, and stop prompt injection against it. It will not currently uninstall it for you.

A practical sequence

  1. Confirm Defender Antivirus is in active mode with real-time protection on across the estate. No active mode, no discovery.
  2. Let the inventory build for three to four weeks. Resist reporting on it until the trend settles.
  3. Run queries 1, 2 and 4 to get the real agent, device and account spread, and share it with the business. The conversation that follows is usually more productive than the technical work.
  4. Run query 3. Auto-approve and untrusted host processes are your first remediation list.
  5. Run queries 12 to 14 to see which risk indicators are actually firing, which combinations produce the High rows, and which handful of people carry most of the exposure.
  6. Run query 7 and catalogue the MCP endpoints. Decide which remote endpoints are sanctioned.
  7. Build a device group from the discovery output and enable runtime protection in audit mode against it.
  8. Review alerts and behaviours for one to two weeks using queries 9 and 10, mark false positives, then widen the audit scope.
  9. Move to block mode, starting with the critical devices identified by query 8.

Verify before you trust

Two notes in the interest of not wasting your afternoon. The AgentsInfo schema documentation and what tenants actually serve are not currently aligned, and the nested localAgentMetadata properties have moved during preview. Run the queries against your own tenant and adjust the column names before you build anything on top of them. Feature availability also varies by tenant during preview, so confirm what you have rather than what the documentation says you should have.

Where this goes next

Discovery is the easy half. The harder question, and the one I will come back to, is what a sanctioned local AI agent actually looks like in a managed estate: which agents are approved, which MCP servers they may reach, which accounts may run them, and how any of that is enforced rather than documented. Microsoft has given us the visibility. The policy is still ours to write.


The rest of the series

References

Seรกn O’Farrell | cloud-secure.ai

Entra Internet Access, Defender for Cloud Apps and Purview

Entra Internet Access, Defender for Cloud Apps and Purview: where the integrations actually stand

Prepared July 2026, updated 30 August 2026. Reflects product capability as at the date of writing and includes preview features, which are subject to change. Preview features should not be relied upon for compliance commitments.

There is a persistent assumption that Microsoft Entra Internet Access can simply consume the Sanctioned and Unsanctioned application tags maintained in Microsoft Defender for Cloud Apps, and that network-layer data loss prevention through Microsoft Purview is a finished, generally available capability. Neither is quite true today. This post sets out the two claims that matter most for anyone designing shadow IT enforcement on the Microsoft stack, using a worked example for Contoso (contoso.com), and then shows where each control plane sits in a high-level architecture. It also adds a third option that the debate over network DLP tends to obscure: make Edge for Business the only browser on managed Windows 11 devices through Intune, and let the browser enforce Purview policy inline – which is generally available now.

1. Entra Internet Access cannot integrate with Defender for Cloud Apps

There is no native integration between Defender for Cloud Apps application tags and Entra Internet Access. Entra Internet Access policies take web categories, FQDNs and URLs as destinations. They do not accept an app tag or a cloud app object, and Entra Internet Access is not one of the secure web gateways that Defender for Cloud Apps integrates with for automatic blocking.

In practical terms, there is no supported “unsanction it in Defender for Cloud Apps, block it in Entra Internet Access” pipeline today. The Defender for Endpoint path remains the only one-click enforcement route for the Unsanctioned tag: unsanctioned apps sync to Defender for Endpoint custom URL indicators automatically, enforced by Network Protection on the endpoint. That path is device-scoped and endpoint-dependent, and it cannot be scoped to an Entra security group.

Bridging the two is therefore customer-owned glue code: export the domains of unsanctioned apps from Defender for Cloud Apps and create matching FQDN rules in Entra Internet Access. This is automatable through Microsoft Graph, but it has to be re-run as tags and catalogue domains change. The one genuinely shared asset across both paths is the cloud app catalogue itself. Entra Internet Access consumes the same Defender for Cloud Apps catalogue for app identification and risk scoring, so risk scores stay consistent even though the enforcement binding does not exist.

One consequence worth flagging: Entra Internet Access is not a supported Cloud Discovery log source, so its Global Secure Access traffic logs do not populate the Discovered apps page in Defender for Cloud Apps. You get two discovery views – endpoint telemetry in Defender for Cloud Apps, and Application Usage Analytics in the Entra admin centre – and you correlate them yourself.

2. Scan with Purview via Entra Internet Access is still in preview – GA has slipped to September 2026

The Purview integration is real and productised. Entra Internet Access content policies can hand inspected content to Microsoft Purview, which evaluates sensitivity labels, sensitive information types, trainable classifiers and user risk, then returns an allow, audit or block decision that Global Secure Access enforces. Basic content policy is generally available. The Scan with Purview action at the Entra Internet Access (Global Secure Access) network layer, however, is still in public preview, and it is billed pay-as-you-go per request – it is not included in Microsoft 365 E5. This preview status is specific to the network enforcement point: the same Purview inspection delivered through Edge for Business is already generally available (see Process C), so โ€œScan with Purview is in previewโ€ is only true of the Entra Internet Access integration, not of Purview inline protection in the browser.

The original Message Center notice (MC1181769) set general availability to begin mid-June 2026 and complete by mid-July 2026, following a public preview that ran from mid-November to mid-December 2025. That date did not hold. A 17 July 2026 update moved GA to September 2026, completing by the end of September, and a second notice (MC1419797, Roadmap ID 566528), which extends the same integration to text, prompts and AI interactions, has general availability beginning late September 2026 and completing by late October 2026. As at the end of August 2026 the Microsoft Learn documentation still carries the preview flag on the Scan with Purview action. Until GA lands, treat Scan with Purview at the network layer as a preview capability – pilot it in narrow scopes and audit mode, and do not build compliance commitments on it. What is generally available is the same Purview inspection delivered through Edge for Business, a different enforcement point for the same policy type; Process C below covers it, and it needs neither the Global Secure Access client nor the September 2026 GA date.

For anyone standing this up in preview, the prerequisites on the Global Secure Access side are specific: enable the internet access traffic profile with the correct user assignments, configure TLS inspection and a TLS inspection policy, create a file policy with a rule that specifies the Scan with Purview action, then bind those into a security profile linked to a Conditional Access policy. The global administrator must also activate Purview pay-as-you-go, though no charges apply during public preview. When it ships, the feature surfaces as a new Inline Web Traffic scenario in Purview DLP policy creation, able to detect and protect sensitive files sent to more than 35,000 unmanaged cloud applications, with matches, alerts and incidents managed centrally in Purview and Microsoft Defender.

References: MC1181769 – Microsoft Purview: Integration with Entra GSA Internet Access to enable sensitive file filtering at the network layer (Microsoft 365 Message Center Archive; Roadmap ID 522096). Published 31 October 2025, timeline updated 17 July 2026. MC1419797 – Microsoft Purview | Data Loss Prevention: Extend Purview data security to the network layer via Entra GSA integration (Roadmap ID 566528). Updated 20 July 2026.

The customer requirement

The organisation in this worked example is Contoso (contoso.com). Contoso’s requirement is specific: protect data that has been classified as sensitive, and keep that protection in force when users interact with SaaS applications – including generative AI, cloud storage and content-sharing services reached through a browser. That splits into three enforcement planes that have to work together. The device plane stops sensitive files leaving a managed Contoso endpoint through channels the network never sees. The network plane inspects and controls sensitive content as it is transmitted to SaaS, from any browser, once traffic is routed and inspectable. The browser plane inspects prompts and uploads inside Edge for Business before they leave the device, and becomes the primary control once Intune has made Edge the only browser on the estate. Classification is the common dependency: all three planes act on Purview sensitivity labels, sensitive information types and trainable classifiers, so “what counts as sensitive” is defined once for contoso.com and enforced in all three. The process flows below show each plane end to end.

Process A – Inline web traffic (network plane): protecting sensitive content sent to SaaS

This is the path that meets the “protect the data when interacting with SaaS” half of the requirement. Protection occurs when content is transmitted, not at the moment it is pasted, and because enforcement is at the network layer it is browser-agnostic once traffic is routed through Entra Internet Access and inspectable.

Inline web traffic - protecting sensitive information pasted into a browser: user copies and pastes sensitive text, submits, traffic is routed through the SASE/SSE service (Entra Internet Access or a supported SASE solution), Microsoft Purview scans and returns a policy verdict (block, warn or audit), and the outcome is recorded in Purview.

Process B – Endpoint DLP (device plane): protecting sensitive files on managed devices

This is the path that meets the “protect data classified as sensitive” half at the point of action on the device. Endpoint DLP enforces on the endpoint itself, works offline, and covers file operations the network plane never sees – USB, print, clipboard and local network shares – as well as uploads to unmanaged cloud apps and non-Edge browsers. It complements the network plane rather than replacing it.

Endpoint DLP - protecting sensitive files on managed devices: user action, activity intercepted by the Endpoint DLP agent, content classified by Microsoft Purview, policy evaluated, DLP decision (block, warn or audit) and outcome recorded in Purview Activity Explorer.

Process C – Browser plane: Edge for Business as the only browser on Windows 11, with Purview inline protection

There is a third enforcement plane for the data itself, and it is the one that is generally available today. If Contoso constrains its managed Windows 11 estate to a single browser, Microsoft Edge for Business becomes the enforcement point: the Purview DLP engine is built into the browser, so a prompt or a file upload is inspected before it leaves the device, with no Global Secure Access client, no TLS inspection and no dependency on the network-layer GA date. To be explicit, because it is the crux of this whole post: Scan with Purview via Edge for Business is generally available (GA), and it is only Scan with Purview via Entra Internet Access (the network-layer enforcement point) that remains in preview. The preview caveat in claim 2 does not apply here. Inline protection for unmanaged AI apps in Edge for Business reached general availability in November 2025 (Roadmap ID 486368, MC1046161), the automation that blocks unprotected browsers for users in scope followed in October 2025 (MC1151234), and inline protection of sensitive text moved onto the pay-as-you-go In Transit Protection meter from 31 October 2025 (MC1154787). It is worth being precise here, because the two capabilities are routinely conflated: this is not the network-layer Scan with Purview action from claim 2. It is the same Purview Inline web traffic policy type with a different enforcement point, and it is the browser rather than the Global Secure Access edge that does the inspecting.

Edge-only is an Intune design decision, not a Purview setting. On a Windows 11 device that is Entra joined and Intune managed, four controls make it stick:

  • Application control. An App Control for Business policy (Intune > Endpoint security > App Control for Business) is the durable control. Build the base policy from the built-in controls – trust Windows components and Store apps, and trust apps from the managed installer so that the Intune Management Extension stays the sanctioned install path – then add a supplemental policy carrying explicit deny rules for the third-party browser publishers (Google LLC, Mozilla Corporation, Brave Software, Opera and Vivaldi). An explicit deny wins over any allow, and publisher rules catch the per-user installs that Chrome and Firefox drop into %LocalAppData% without administrator rights. Extend the deny rules to the packaged (MSIX) versions in the Microsoft Store as well, or block the Store, because the trust-Store-apps option in the base policy can otherwise let a Store-installed Firefox through. Deploy in audit mode first and read the CodeIntegrity events before enforcing. AppLocker over a custom OMA-URI still works and scopes per user or group, but Microsoft are no longer adding features to it, so treat it as the fallback rather than the design.
  • Clean-up and defaults. Remove browsers already present with Intune Win32 uninstall assignments or a remediation script, and set Edge as the default handler for http, https, .htm and .html through a DefaultAssociationsConfiguration XML delivered from Intune, so links from Outlook, Teams and Office open in Edge without prompting. Keep users as standard users – LAPS for the local administrator account, Endpoint Privilege Management for the exceptions – because none of this holds for a local administrator.
  • Edge identity and version. Edge policies in the Settings Catalog force browser sign-in, restrict sign-in to the contoso.com tenant, disable guest mode and keep Edge on a current stable channel: inline protection needs one of the two latest stable versions, from version 144. Policies for unmanaged apps apply across every Edge profile on a managed device, including InPrivate; policies for Entra-connected apps apply only in the work profile, which is why the work profile has to be enforced rather than encouraged.
  • The Microsoft-managed shortcut. The Edge management service (Microsoft 365 admin centre > Settings > Microsoft Edge > Security settings) has a Block other browsers switch that creates the Intune configuration policy for you; it needs an Intune licence, and it takes precedence over every other setting in that profile. Purview does the same thing automatically for users in scope of a block policy: two security groups, two Edge configuration policies and two Intune policies appear, Firefox and other browsers are blocked outright, and Chrome is blocked unless the Purview extension for Chrome is installed and current, in which case Chrome runs with the AI app list denied. That automation is scoped to the DLP policy, so it is not a substitute for a standing Edge-only baseline, but it is a useful signal that Microsoft themselves treat the other browsers as the bypass to close.

On the Purview side the policy is the same Inline web traffic scenario the network plane uses, with a different enforcement point that is generally available. Create it under Data loss prevention > Policies > Create policy > Inline web traffic, scope the cloud apps through Adaptive app scopes > All unmanaged AI apps, and on Choose where to enforce the policy select Edge for Business (the GA path) rather than Network and non-Microsoft secure browsers (which routes to the preview network integration). The rule actions are Restrict browser and network activities > Text sent to or shared with cloud or AI apps, and File uploaded to or shared with cloud or AI apps, each set to audit or block; Adaptive Protection can be used as a condition so that the action varies with user risk. Saving the first policy triggers the Edge management service automation described above, which needs an admin holding Directory Reader, Microsoft Edge administration and Intune administration, and does not support tenants using Intune multi-admin approval. Run it in simulation mode first, then read Activity Explorer with the enforcement plane filtered to browser.

Three limits keep this from replacing Process A. First, scope: inline protection for unmanaged apps applies only to the Purview catalogue of supported unmanaged apps – a curated list of consumer generative AI services (ChatGPT, Google Gemini, DeepSeek, Grok, Meta AI, Perplexity, the consumer version of Copilot and around a dozen more) – not the tens of thousands of unmanaged cloud apps the network path targets. Entra-connected SaaS is covered separately through Defender for Cloud Apps in-browser protection, where session policies are enforced natively in Edge and Enforce usage of Edge for Business can be set to Allow access only from Edge. Second, egress the browser never sees – desktop applications, APIs, add-ins and sync clients – stays a network-plane or device-plane problem. Third, billing: unmanaged-app inline protection in Edge is a pay-as-you-go capability on the In Transit Protection meter, just as Scan with Purview is; only the Entra-connected app scenarios are included in Microsoft 365 E5. Two interactions with the other planes also need to be designed in. Endpoint DLP takes precedence over the inline Edge policy where both target the same user, context and action, so if Process B already blocks uploads to the same apps the Edge policy will silently do nothing. And with Edge as the only browser, Defender for Endpoint web protection is enforced natively by SmartScreen, Network Protection’s job narrows to non-browser processes, and the Purview extensions for Chrome and Firefox drop out of scope entirely.

Inline web traffic - protecting sensitive information in Edge: user action, user submits, traffic routed via Edge for Business (enforced on the device via Intune), inspection and classification by Microsoft Purview, DLP decision (block, warn or audit) and outcome recorded in Purview.

High-level architecture

The four control planes are complementary, not alternatives. Defender for Cloud Apps discovers, scores and holds the sanctioned/monitored/unsanctioned posture; Defender for Endpoint enforces on the device plane and offline; Edge for Business enforces Purview policy inline in the browser on managed Windows 11 devices where Intune has made it the only browser; Entra Internet Access enforces identity-scoped policy at the network edge and is the delivery point for Purview network DLP. The diagram below shows how traffic and signals move between them.

Shadow IT and data-in-transit enforcement - control planes: Defender for Cloud Apps (source of truth for app risk), Defender for Endpoint (device plane), Edge for Business (browser plane), Entra Internet Access (network/identity plane) and Microsoft Purview (data decisions), showing how traffic and signals move between them.

Three design points fall straight out of that picture. First, TLS inspection is the enabling dependency, not an optional enhancement – URL-level threat indicators, content inspection and the Purview integration all depend on it being deployed, with the certificate distributed through Intune. Second, the endpoint and network planes can contradict each other: Defender for Endpoint evaluates its web protection in a fixed order and allow indicators take precedence over web content filtering, so an app sanctioned in Defender for Cloud Apps can remain reachable even where a category block exists. Where both planes are active, document which plane owns which decision and avoid encoding the same intent twice. Third, the browser plane and the device plane overlap: Endpoint DLP takes precedence over the inline Edge policy for the same user, context and action, so an Edge for Business policy can pass testing and do nothing in production if Process B already covers the app. Decide which plane owns prompts and uploads to the AI apps, and keep the other in audit.

Recommended target pattern

  • Discover and score in Defender for Cloud Apps. Keep the cloud app catalogue and App Discovery policies as the single source of truth for application risk.
  • Enforce the organisation-wide baseline through Defender for Endpoint. Accept the up-to-three-hour propagation and the device-group scoping model for blanket blocks and warn-and-educate.
  • Make Edge for Business the only browser on managed Windows 11, and enforce inline. App Control for Business deny rules for the other browsers, Edge as default, work profile enforced, then an Inline web traffic DLP policy with Edge for Business as the enforcement point for the supported unmanaged AI apps. This is generally available now and is the fastest route to blocking sensitive prompts to consumer AI.
  • Deliver exceptions and identity-scoped policy through Entra Internet Access. Use security profiles linked to Conditional Access for per-group allow lists, risk-based restriction and non-browser egress.
  • Layer Purview network DLP for data in transit – once it reaches GA, currently September to October 2026 – for the long tail of unmanaged apps and the non-browser egress that the browser plane cannot see. Start narrow: unmanaged AI apps and highest-sensitivity labels, in audit mode, before moving to block.
  • Automate the tag-to-rule bridge. Build a scheduled Graph-based job that exports unsanctioned app domains and reconciles them against Entra Internet Access FQDN rules for contoso.com, until Microsoft close this gap natively.

Global Secure Access is developing rapidly. Several capabilities described here, including the Scan with Purview action and text and prompt inspection, are in preview and subject to change. Validate licensing entitlements against your current agreement before finalising design decisions.

Bridging the gap: letting Defender for Cloud Apps and Entra Internet Access co-exist

The architecture above is honest about one thing: there is no native binding between the Defender for Cloud Apps Unsanctioned tag and Entra Internet Access. That does not mean Contoso has to choose one or the other. The two planes answer different questions – which applications may be reached at all (Defender for Cloud Apps, through its catalogue, risk scoring and app tags) and which identities may reach a given destination, under what conditions, with what inspection (Entra Internet Access, at the network edge). Run together, Defender for Cloud Apps supplies the granular, catalogue-driven shadow IT control that Contoso is already paying for in its Microsoft 365 subscription, while Entra Internet Access – in my view the stronger web filtering service of the two, with real identity-scoped policy and Conditional Access binding rather than device-scoped indicators – owns the web-filtering and secure web gateway role. The bridge is three settings, and it is deliberately not a shared policy object: it is a division of labour that keeps each plane doing what it does best.

1. Put Defender for Endpoint network protection into block mode

Network protection is the enforcement muscle behind the Defender for Cloud Apps integration, and it only enforces when it is in block mode. In audit mode the indicators are evaluated and logged but nothing is stopped, and when it is disabled the Unsanctioned tags are, in the phrase one practitioner uses, just stickers in the portal. Deploy it through Intune (Endpoint security > Attack surface reduction, or the Settings Catalog) and confirm the state on a device with Get-MpPreference | Select-Object EnableNetworkProtection – the value must be 1 (block), not 0 (disabled) or 2 (audit). Two operational notes matter here: network protection blocks at the domain level, not full URL paths, and it cannot inspect QUIC, so disable UDP 443 in the managed browsers or with a Windows Firewall rule to stop non-Edge browsers slipping past the block over QUIC.

2. Enable custom network indicators – but leave MDE web content filtering off

This is the part that lets the two services share a device without fighting over it. In Microsoft Defender XDR, under Settings > Endpoints > Advanced features, turn on Custom network indicators, and in Settings > Cloud Apps > Cloud Discovery > Microsoft Defender for Endpoint, turn on Enforce app access. That is the whole dependency. Defender for Endpoint does not need its own web content filtering switched on: web content filtering is MDE’s category-based blocking, and it is a separate feature from the custom URL/IP indicators that the integration uses. With custom network indicators enabled, network protection simply reads the block (and warn) indicators that Defender for Cloud Apps populates when an app is tagged Unsanctioned (or Monitored), and enforces them on the endpoint. Contoso therefore gets Defender for Cloud Apps app governance without turning on a second, overlapping web-filtering engine on the device – the category-level web filtering stays with Entra Internet Access, where it belongs. This is also why the planes do not collide: Defender for Cloud Apps writes indicators, network protection enforces them at the domain level, and Entra Internet Access continues to enforce identity-scoped category, FQDN and URL policy at the edge with TLS inspection. The one precedence rule to keep in mind is Defender for Endpoint’s own order for indicators – Allow > Warn > Block – so an explicit allow indicator will override a category block. Defender for Cloud Apps never auto-creates allow indicators for sanctioned apps, so left alone the two planes reinforce rather than cancel each other; just avoid hand-authoring allow indicators for anything you also filter by category at the edge.

3. Create an app discovery policy that unsanctions new risky apps automatically

The final piece makes the baseline self-maintaining. Rather than tagging apps by hand, create an app discovery policy (Cloud Apps > Policies > Policy management > Create policy > App discovery policy) built from the New risky app template. Under App matching all of the following, set the Risk score filter to the risky band and add an App tag filter of does not equal Sanctioned so the policy can never turn on Contoso’s approved apps. Under Governance, select Tag app as unsanctioned. From then on, any newly discovered application whose risk score falls in that band is unsanctioned automatically, its domains sync to Defender for Endpoint as block indicators, and network protection blocks it within the integration’s roughly three-hour SLA.

One point worth stating plainly, because the slider is a frequent source of error: in Defender for Cloud Apps a lower score is the riskier one. The catalogue scores each app from 0 to 10, where 0 is the highest risk and 10 the lowest, so Contoso’s intent – unsanction anything risky – is expressed as a risk score of 0 to 4. Setting the filter to that range, with Sanctioned apps excluded and the daily-traffic threshold left generous to cut noise, gives a durable rule: the safe, high-scoring apps (5 and above) are left alone, the genuinely risky new arrivals are blocked on the device automatically, and anything Contoso wants to permit as an exception is still delivered cleanly through an identity-scoped Entra Internet Access allow, not through hand-edited endpoint indicators.

What this buys Contoso

The net effect is that Contoso takes full advantage of the Microsoft 365 subscription it already holds. Defender for Cloud Apps does the discovery, risk scoring and automated shadow IT governance – the granular control – and pushes its verdicts to the endpoint through network protection without needing MDE’s own web filtering turned on. Entra Internet Access remains the web filtering and secure web gateway of record, delivering per-user and per-group policy, category filtering, TLS inspection and the delivery point for Purview network DLP when Scan with Purview reaches GA. Neither service is subordinated to the other: they co-exist, each owning the decisions it is best placed to make, and the only ongoing task is the tag-to-rule bridge noted in the target pattern – reconciling the domains of newly unsanctioned apps into Entra Internet Access FQDN rules through Microsoft Graph, until Microsoft close that gap natively.

References: Govern discovered apps using Microsoft Defender for Endpoint; Create indicators for IPs and URLs/domains (indicator precedence: Allow > Warn > Block); Create cloud discovery policies; Turn on network protection (Microsoft Learn).

A note on Scan with Purview costs: they are very small

Because Scan with Purview and the inline protection scenarios are billed pay-as-you-go rather than bundled into Microsoft 365 E5, the natural question is what that actually costs. In practice the answer, for a normally-behaving user base, is: very little. The network and browser inline scenarios are metered on Microsoft Purviewโ€™s In Transit Protection meter, charged per request against traffic that DLP actually inspects – not per user, per device or per policy. You pay for what is scanned, so the bill scales with the volume of sensitive-content submissions to the destinations you have chosen to protect, not with headcount.

Two design choices keep that volume, and therefore the cost, low. First, scope narrowly: point the content policy at the specific FQDNs and unmanaged AI destinations that matter (the worked examples target ChatGPT and Gmail upload endpoints, not the whole web), so the meter only ever sees a small slice of egress. Second, classification happens before metering in the sense that matters operationally – you are protecting a handful of high-sensitivity labels and sensitive information types, not every byte a user transmits. For most Contoso-sized estates the monthly In Transit Protection charge lands in the low tens of euro rather than anything that would trouble a security budget, which is why the recommended pattern is to pilot it in audit mode without hesitation on cost grounds and only widen scope deliberately.

Two caveats worth stating so the number is not a surprise. Pay-as-you-go billing must be enabled, with an Azure subscription linked to Purview, before the network-enforcement option even appears in the DLP wizard; and you should confirm current per-request pricing against your own tenant, since the meter rate can change and varies by region. Model it for real numbers in the Azure Pricing Calculator, and watch consumption in the Purview Usage center once live. For the billing model and the request definitions, see Learn about Microsoft Purview billing models; to estimate your own figure, use the Azure Pricing Calculator.