Lesson 2 of 5 Securing AI Agent Identities

Implementing Conditional Access for Agent Identities

This lesson explains how the access pattern decides the target of a Conditional Access policy.

Learning outcomes

After completing this lesson, you will be able to:

  • Identify the three access patterns.
  • Choose a policy target for each one.
  • Explain the effect of targeting a blueprint.
  • Identify what Conditional Access does not cover.

Why the target changes

A person signing in is a simple case: the user is the subject of the policy. Agents are less simple. Depending on how an agent works, the identity that matters could be a user, the agent identity or an agent user account. A policy that targets the wrong object simply does not apply, and nothing warns the administrator. Candidates should therefore begin with the access pattern and work out the target.

The following table sets out the three patterns.

Access patternWho is the subjectPolicy target
On behalf of a userThe human userUsers and groups
Application-onlyThe agent itselfThe agent identity, or its blueprint
Agent userThe agent's user accountAgents, selected under Users, agents, or workload identities
Sort into groups

Who does the policy target?

Exam skills 3.1.4

Choose the Conditional Access target for each agent access pattern.

Log in to try this activity Interactive activities are free with an account.

Writing a policy

In the Conditional Access policy page, the assignment section reads Users, agents, or workload identities. Selecting Agents reveals options for choosing all agents, specific identities, blueprints, or agents selected by attribute.

Several behaviours deserve attention. Policies that target Users do not apply to agent user accounts, so an existing organization-wide user policy gives no coverage. A policy that targets a blueprint covers all agent identities created from that blueprint, including future ones, which suits an organization that creates agents frequently. Custom security attributes can be assigned to agents, and policies can target them, so a classification such as DataAccess=High can drive policy.

Grant controls differ from those for people. An agent cannot perform multifactor authentication, so the decision for an agent's own sign-in is usually to block or to allow under conditions, such as an approved network location or a low risk level. Agent execution environments, in preview, is a condition that can limit where agents run. Agent risk from ID Protection can be used as a condition, and setting it needs the Conditional Access Administrator role.

What is not covered

Conditional Access has limits, and they matter when judging a design.

  • API key access is not covered, because no Microsoft Entra token is issued. An agent that uses a key bypasses these policies, so prefer Microsoft Entra authentication.
  • A tenant with security defaults enabled cannot use these policies, as with other Conditional Access policies.
  • On-behalf-of flows follow the user's policies, so strong user policies protect delegated agents too.
True or false

Gaps and licensing

Exam skills 3.1.4

Check the limits and licensing of Conditional Access for agents.

Log in to try this activity Interactive activities are free with an account.

Licensing

Conditional Access for agents needs Microsoft 365 E7, or a Microsoft Agent 365 licence together with at least Microsoft Entra ID P1 or Microsoft 365 E3. Licensing in this area changes frequently, so confirm details on Microsoft Learn before planning a rollout.

A rollout approach

As with other Conditional Access work, use report-only mode first, since an unexpected block could stop a business process with no person to notice it.

  1. Inventory

    List agents, their access patterns and their blueprints.

  2. Classify

    Apply custom security attributes for data access or business impact.

  3. Draft

    Create policies per access pattern, in report-only mode.

  4. Review

    Examine sign-in logs for agent sign-ins and policy results.

  5. Enforce

    Enable policies, starting with the highest-risk group.

Worked example

Choosing the target

A company has three agents. Agent A summarizes documents on behalf of signed-in staff. Agent B runs overnight with its own identity, created from a blueprint that will be used to create more agents. Agent C has a mailbox and appears as a user account. The company wants all three to be limited by Conditional Access. A policy that targets all users has been in place for a year. Which agents does that policy cover, and what else is needed?

Agent A works on behalf of users, so the existing user policy applies. Agent B runs application-only, so the policy should target its blueprint, which also covers future agents. Agent C uses an agent user account, so it needs a policy with Agents selected, because policies aimed at Users do not cover agent users.

Adding the agent user account to an All users group would not change this outcome. Requiring MFA for B or C would not work, since neither can satisfy it interactively.

Check yourself

Why not simply require MFA for an agent running on its own identity?

Show answer

An agent cannot complete MFA interactively, so policies rely on blocking and on conditions.

Exam Tips

Remember for the exam

  • Start from the access pattern, then choose the target.
  • Policies aimed at Users do not cover agent user accounts.
  • Target a blueprint to include future agent identities.
  • API key access bypasses Conditional Access.