
Maynor in the Cloud / Beyond the Tenant
Part 5 of 6 — Understanding Conditional Access for AI Agents
If an AI agent is identified as high risk and Conditional Access blocks it from authenticating, does that mean the agent can no longer access our resources?
Not necessarily.
Throughout this series, we’ve looked at how AI agents acquire identities, how they access resources, and how Microsoft Entra ID Protection can help us identify risky agents.
In Part 4, we also established the difference between an Agent Identity and an Agent User.
Now we need to understand how we secure those identities and, more importantly, where those security controls stop.
Conditional Access for AI agents
When designing Conditional Access policies for employees, we typically consider several factors.
Who is accessing the resource? Where are they connecting from? Are they using a compliant device? Do we need to enforce multifactor authentication?
With AI agents, some of those considerations change.
An autonomous agent may be operating without a signed-in user, without an associated device, and without anyone available to complete an MFA challenge.
So how do we establish the conditions under which that agent should be allowed to operate?
Before answering that question, we need to understand which identity the agent is actually using to access the resource.
Understanding which identity to protect
Let’s return to our employee onboarding agent.
The agent may operate in three different ways:
- On behalf of an HR coordinator who is signed in.
- Autonomously, using its own Agent Identity.
- Through its associated Agent User account.
Although we’re dealing with the same agent and the same business process, we’re not necessarily dealing with the same security principal.
Delegated access
When the agent retrieves information on behalf of the HR coordinator, the coordinator is the subject of the delegated access token.
The applicable user Conditional Access policies are evaluated as part of that authentication flow.
We can enforce supported user-based controls, such as MFA, without treating the agent as an independent employee.
Agent Identity
When the onboarding agent performs an automated operation using application permissions, there may be no employee involved in the authentication process.
The agent authenticates using its own Agent Identity.
In this scenario, we need Conditional Access policies that specifically target Agent Identities, either directly or through their associated Agent Identity Blueprint.
We cannot rely on the policies we’ve already configured for our employees.
Agent User
If the onboarding agent operates through its own Agent User account, we introduce another policy boundary.
Although the Agent User is associated with an Agent Identity, it requires its own Conditional Access policy coverage.
Even an existing policy targeting all users does not automatically include Agent Users under the current targeting model.
Securing an Agent Identity does not automatically secure its associated Agent User.
If our agent uses multiple authentication methods, our Conditional Access design needs to account for each of them.
Which Conditional Access controls can we enforce?
When designing Conditional Access for AI agents, we cannot simply replicate the controls we’ve implemented for employees.
The available conditions and access controls depend on the identity being used and, in some cases, where the agent is running.
| Security control | Delegated access | Agent Identity | Agent User |
|---|---|---|---|
| Block access | Yes | Yes | Yes |
| Require MFA | Yes | No | No |
| Agent risk condition | No | Yes | Yes |
| Require compliant device | Yes | No | Supported managed endpoints |
| Require compliant network | Yes | No | Supported managed endpoints |
For an autonomous Agent Identity, blocking access is currently the only available grant control.
There is no employee available to respond to an MFA challenge, and we cannot require that identity to demonstrate device compliance in the same way we would with an employee.
Agent Users, however, introduce additional possibilities.
This is where we need to understand the agent’s execution environment.
Does the agent run on a device?
Consider two versions of our onboarding agent.
One runs directly in cloud infrastructure and performs its operations through APIs.
The other runs on a managed endpoint and interacts with applications through a desktop environment.
Although both agents may perform similar business functions, the security signals available to Conditional Access can be different.
An Agent User operating on an Intune-managed Windows 365 Cloud PC for Agents can provide device compliance signals. With the appropriate Global Secure Access configuration, it can also satisfy compliant network requirements.
A cloud-native agent may not have an associated device or provide those same signals.
If we apply a device compliance requirement indiscriminately, we could block the cloud-native agent without giving it any way to satisfy the policy.
Microsoft provides an agent execution environments condition that allows us to scope these requirements to agent user sessions originating from endpoints.
This is why understanding where the agent runs is just as important as understanding how it authenticates.
Designing the Conditional Access logic
Now that we understand which identity to protect and which controls are available, we can start looking at the conditions under which access should be permitted.
Consider an autonomous onboarding agent that processes approved requests throughout the day.
Under normal circumstances, the agent needs to access specific resources to complete its work.
But what happens if Microsoft Entra ID Protection identifies that agent as high risk?
We can configure a Conditional Access policy that uses agent risk as a condition and blocks access when the configured risk threshold is met.
The policy decision depends on the identity being targeted, the resource being accessed, the supported conditions defined in the policy, and whether the policy is being enforced.
User policies
Agent policies
Agent User policies
Identity · Resource · Supported conditions
No new token
Resource validates token and evaluates permissions
An agent falling outside the conditions of a blocking policy doesn’t automatically mean it has access.
Other applicable policies still need to be evaluated, and the agent still requires the appropriate permissions to perform the requested operation.
Conditional Access determines whether access can proceed under the current conditions. It does not replace resource authorization.
What happens when an agent becomes high risk?
This is where we need to be careful about what Conditional Access actually enforces.
Consider the following scenario.
Our onboarding agent successfully authenticates and obtains an access token for an enterprise resource.
While that token remains valid, Microsoft Entra ID Protection detects suspicious activity and identifies the agent as high risk.
We have an enabled Conditional Access policy that blocks high-risk Agent Identities.
The next time the agent attempts to obtain a token within the scope of that policy, access can be blocked.
But what about the access token that was already issued?
An access token that has not expired may continue to provide access if the target resource still accepts it.
Access token issued
Microsoft Entra ID Protection
CA policy evaluated
Enabled high-risk policy prevents new token
Already issued
Expiry or earlier applicable enforcement
Access may continue within existing permissions
We may have successfully prevented the agent from obtaining another token without having immediately terminated its existing access.
Continuous Access Evaluation can provide earlier enforcement in supported scenarios. However, we need to understand whether the authentication flow, client, target resource and relevant security event support that behavior.
I would not assume that a change in agent risk automatically invalidates every previously issued access token.
That needs to be validated as part of the architecture.
Blocking new access and terminating existing access are two different security outcomes.
Conditional Access is not the entire containment strategy
In Part 3, we discussed the operational impact of containing a high-risk agent.
Conditional Access plays an important role in that process, but there are other considerations.
If our onboarding agent is compromised, preventing new authentication attempts may not be enough.
We may also need to stop the agent’s execution, restrict its resource permissions, investigate existing activity, and determine whether additional containment measures are required.
At the same time, we need to understand what happens to the onboarding process when that agent is taken offline.
Who takes ownership of the outstanding requests? Can the business process continue without the agent? How do we safely restore the agent once the investigation is complete?
These are questions I would want answered before introducing an autonomous agent into a business-critical process.
How far does Conditional Access extend?
We also need to understand how the agent accesses systems outside Microsoft Entra.
An agent may use Microsoft Entra authentication for some resources while accessing other systems through API keys, connectors, or separate authentication mechanisms.
A Conditional Access policy cannot enforce access controls against an authentication process that takes place entirely outside Microsoft Entra.
For that reason, understanding the agent’s identity is only part of the discovery process.
We also need to understand how the agent connects to each resource and where access is actually enforced.
Otherwise, we could have an agent that is blocked from accessing one resource but remains operational against another.
Licensing and feature availability
Before committing to a Conditional Access design for AI agents, we also need to understand the licensing requirements.
Microsoft currently documents two licensing paths for agent-specific Conditional Access:
- Microsoft 365 E7.
- Microsoft Agent 365 paired with Microsoft Entra ID P1 or Microsoft 365 E3, at a minimum.
For organizations using the standalone Agent 365 licensing path, risk-based Conditional Access introduces an additional requirement for Microsoft Entra ID P2 or Microsoft 365 E5.
There are also dependencies associated with managed endpoint and compliant network controls that need to be considered separately.
At the time of writing, Microsoft documents agent risk, Agent User targeting and the agent execution environments condition as preview capabilities.
These are important considerations, particularly when we intend to rely on these controls to protect production workloads.
A security design that depends on a control the organization cannot enforce is not a completed design.
How I would approach the design
I would start by understanding the business process and identifying every authentication method the agent uses.
From there, I would establish which Conditional Access policies are required for each identity, which resources need to be protected, and what risk conditions should trigger a block.
Where the agent operates on a managed endpoint, I would also determine whether device compliance and network controls are appropriate.
Before enforcing those policies, I would use report-only mode where supported to understand the potential impact on the agent and the business process.
I would then validate the behavior of existing access tokens when risk conditions change.
Testing only whether an agent can obtain a new token is not enough. We also need to understand what happens to access that was established before the policy decision changed.
The objective is to understand the actual level of enforcement we’re introducing into the environment rather than making assumptions based on the presence of a policy.
Final thoughts
Conditional Access gives us a way to control the circumstances under which AI agents can access enterprise resources.
But unlike a traditional employee, an AI agent may operate through multiple identities and authentication flows as part of the same business process.
Our security architecture needs to account for those differences.
For me, a successful Conditional Access design isn’t simply one that blocks an agent when it becomes high risk. It’s one where we understand exactly what has been blocked, what access may remain, and how the organization responds.
In the final part of this series, we’ll look beyond authentication and Conditional Access to understand how we govern these identities throughout the agent lifecycle.
When AI Gets an Identity — Series Navigation
- Part 1 — Introducing Microsoft Entra Agent ID
- Part 2 — Delegated vs. Autonomous: Rethinking AI Agent Access
- Part 3 — Detecting and Containing High-Risk AI Agents
- Part 4 — Agent Users vs. Agent Identities
- Part 5 — Securing Agent Identities and Agent Users with Conditional Access (current article)
- Part 6 — Governing the Lifecycle of AI Agents
References
Explore more: See the AI & Copilot pillar for more Microsoft 365 AI, security and governance guidance.
