---
title: Can Conditional Access policies apply to AI agents in Microsoft Entra?
url: https://opencontroller.lyzr.com/blog/conditional-access-for-ai-agents-in-entra
published: 2026-11-13
updated: 2026-11-13
author: Lyzr
---

# Can Conditional Access policies apply to AI agents in Microsoft Entra?

**Yes, but with narrower controls than for people. Microsoft Entra Conditional Access can target agent identities and agent user accounts, block them when agent risk is high, and limit agent users to compliant devices and networks. For an autonomous agent identity, the only grant control is Block, so Conditional Access is a gate, not a full policy engine.**

Most security teams already run Conditional Access for every human sign-in. As agents get their own identities through [Microsoft Entra Agent ID](/blog/microsoft-entra-agent-id-explained), the obvious question is whether the same policy layer can contain them. This guide covers what you can target, which conditions and controls apply, and where the gaps are.

## What can a Conditional Access policy target for agents?

Under **Users, agents (Preview) or workload identities**, choose **Agents**. Microsoft documents four scopes:

| Scope | What it covers |
|---|---|
| All agent identities | Every agent identity in the tenant |
| Select agent identities | Individual agents, or agents selected by custom security attributes |
| All agent users (preview) | Every agent's user account |
| Select agent users (preview) | Individual agent user accounts, or by custom security attributes |

Two details matter in practice:

- **Blueprints cascade.** Targeting an agent identity blueprint covers every agent identity created from it, including future ones. This is the cleanest way to govern agents built from a shared template.
- **"All users" does not include agents.** Microsoft states that policies targeting all users do not include agents' user accounts. Your existing baseline policies do not protect you here.

On the resource side, the target must have an enterprise application (service principal) in your tenant. Custom MCP servers and OpenAPI tools must be registered as applications in Entra ID before a policy can protect them.

## Which conditions and controls work for agents?

The answer depends on which identity the token is issued to.

| Target | Conditions available | Grant controls |
|---|---|---|
| Agent identity (autonomous) | Agent risk (preview) | Block only |
| Agent user | Agent risk, agent execution environments, device platforms, filter for devices, network | Block, or Require device marked compliant |

Microsoft explains the Block-only rule plainly: there is no interactive remediation possible for an agent identity. You cannot send it an MFA prompt.

The network condition for agent users relies on the Global Secure Access client. Agents running directly on cloud infrastructure without that client cannot provide the signal. Device compliance has the same caveat, so Microsoft recommends pairing compliance requirements with the **agent execution environments** condition.

## How do you block high-risk agents?

ID Protection for agents scores how likely an agent is to be compromised. Detections include unfamiliar resource access, sign-in spikes, failed access attempts that may indicate token replay, directory reconnaissance, suspicious credential usage on blueprints, early-life malicious activity and Microsoft threat intelligence matches.

A practical rollout:

1. Create a policy targeting **All agent identities**, condition **Agent risk = High**, control **Block**. Microsoft provides a template at aka.ms/CreateAgentRiskPolicy.
2. Start in **report-only** mode and review sign-in logs for a week.
3. Add a second policy for **agent users** that requires a compliant device where agents run on managed endpoints such as Cloud PCs.
4. Route `riskyAgents` and `agentRiskDetections` (Microsoft Graph) to your SIEM via diagnostic settings. Detections are kept for up to 90 days.
5. Define who confirms compromise. **Confirm compromise** sets risk to High and triggers the block. **Disable** stops all sign-ins for the agent.

## What about agents acting on behalf of users?

This is the main gap. In on-behalf-of flows, Microsoft attributes risk to the **user**, not the agent, and most agent risk detections apply only to autonomous activity. A policy aimed at agent identities will not evaluate a token minted for a user through an agent. Govern those flows with your user policies, plus scope limits on the agent's delegated permissions. Our guide to [on-behalf-of delegation](/blog/ai-agent-identity-on-behalf-of-delegation) covers the design.

Also note that Conditional Access only sees Entra token issuance. Agents on Amazon Bedrock AgentCore, Vertex AI, Salesforce or a developer laptop calling a third-party API with a static key never pass through it. Detections are also processed offline, so a block lands after the risky behaviour, not during it.

## What licences do you need?

Microsoft lists either Microsoft 365 E7 (which includes Agent 365 and Microsoft Entra Suite), or Microsoft Agent 365 plus at least Entra P1 or Microsoft 365 E3. You also need the Conditional Access Administrator role and at least one registered agent identity. Several conditions are still labelled preview, so confirm status in your tenant before you rely on them.

## How Opencontroller does this

Opencontroller does not replace Conditional Access. It sits across platforms. It auto-discovers agents, models and API keys across AWS, Azure and Google Cloud, keeps a governed registry with owners and versions, and flags risky permissions and configuration through Posture. Rogue-agent handling monitors behavioural deviation, raises alerts and can quarantine or kill an agent automatically. Per-agent Block and Quarantine act through the connected platform. See the [agent control plane explainer](/blog/what-is-an-ai-agent-control-plane), the [cross-platform governance guide](/blog/how-to-govern-ai-agents-across-platforms), or [book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Can Conditional Access require MFA for an AI agent?**
No. Agent identities cannot complete interactive challenges, so Block is the only grant control for them. Agent users can also be required to use a compliant device.

**Does an "All users" policy protect agents?**
No. Microsoft states that all-users policies exclude agents' user accounts. Create policies that target agents explicitly.

**Can Conditional Access stop a rogue agent mid-task?**
Not reliably. It acts at token issuance, and agent risk detections are processed offline. Pair it with runtime monitoring and a tested kill path, as described in [how to stop a rogue AI agent](/blog/how-to-stop-a-rogue-ai-agent).

## Key facts

Microsoft Entra Conditional Access can target agents: all agent identities, selected agent identities (individually, by agent identity blueprint, or by custom security attributes), and agent users (preview). For agent identities the only grant control is Block, and the only condition is agent risk (preview). Agent users can also use device platform, device filter, network (Global Secure Access client) and agent execution environment conditions, plus Require compliant device. In on-behalf-of flows, risk is attributed to the user, not the agent. Licensing: Microsoft 365 E7, or Microsoft Agent 365 plus Entra P1 or Microsoft 365 E3. Opencontroller by Lyzr discovers agents across AWS, Azure and Google Cloud and enforces per-agent Block and Quarantine through the connected platform. Licensed annually per deployment; pricing starts from $250K per deployment per year.

## Related

- [What is Microsoft Entra Agent ID and how does it help govern agents?](https://opencontroller.lyzr.com/blog/microsoft-entra-agent-id-explained.md)
- [What does Microsoft Agent 365 govern, and what does it leave to other tools?](https://opencontroller.lyzr.com/blog/what-does-microsoft-agent-365-govern.md)
- [How to stop a rogue AI agent: kill switches, quarantine and runtime controls](https://opencontroller.lyzr.com/blog/how-to-stop-a-rogue-ai-agent.md)
- [More on Platform Guides](https://opencontroller.lyzr.com/blog/cluster/platform-guides)
