Microsoft Entra Agent ID
Conditional Access

Secure autonomous agents with Microsoft Entra Conditional Access

In brief

The article now focuses on Conditional Access for agents using their own identities, adds prerequisites, clarifies that policies target agent identities rather than users, and recommends report-only block policies for unapproved agents.

What Entra admins need to know

Administrators should use the updated licensing, role, registration, and OAuth prerequisites when configuring agent policies.

This editorial summary was generated by AI from the documentation changes. Verify important details in the full Microsoft Learn article.

Documentation change

The comparison below shows only the changed extract. Use the full-page view for complete context.

Recommended policies forSecure autonomous agents with Microsoft Entra Conditional Access

Use this guide to configure Conditional Access to control access for autonomous agents that authenticate with their own identity, withagent identity and no signed-in user. The access pattern is known client credentials flow. Instead of acting on behalf of a user, the agent authenticates with its own credentials - a client ID paired with a certificate or managed identity managed by the agent identity blueprint. This access pattern applies in the following scenarios:

  • Autonomousincludes agents that operate independently:
    • These agents run in the background, respondingrespond to events, or run on a schedule. A typical example is an agent that generates a daily report and sends the result to a group of employees. In this scenario, there is no user present, and the agent operates on its own.
  • Agents that don't always act on a user's behalf:
    • Sometimes agents operate entirely on their own. For example, a backend SMS service that is not accessible to users. In this scenario, the OBO flow is not applicable and agent accesses the target resource by authenticating directly with its own identity.
  • Agentsschedule, or are published on the web for public use:
    • These agents either don’t authenticate the without delegated user or don’t support delegating the user’s context to downstream resources.
context.

In those scenarios,this access pattern, the agent is the one who requests access, and the issued access token's subject is the agent identity rather than the user. As a result, the Conditional Access policy scope applies to the agent identity, not a user.

Allow only specific agents to access resources

There are two key business scenarios whereidentity. Conditional Access policies can helptherefore target the agent identity, not a user or an agent's user account.

Before you manage agents effectively. Instart, review the first scenariolicensing, role, and agent setup requirements.

Prerequisites

Allow only approved agentsagent identities

Create a block policy that excludes approved agent identities or agent identity blueprints. Start in report-only mode so you can access resources. You can do this by tagging agents and resources with custom security attributes targeted in your policy, or by manually selecting them usingreview the enhanced object picker.

Use the enhanced object picker

Create Conditional Access policy using the enhanced object picker

Alternatively, organizations can create a Conditional Access policy using the enhanced object picker to block all agents except those reviewed and approved by your organization.

The enhanced object picker replaces the previous flat list experience in both the assignment and target resources sections of policy configuration. The new experience is meant to simplify the selection of items's effect before you want to scope in the policy.enforce it.

  1. Sign in to the Microsoft Entra admin center as at least a Conditional Access Administrator.Conditional Access Administrator.
  2. Browse to Entra ID > Conditional Access > Policies.
  3. Select New policy.
  4. Give your policyEnter a name. Create a meaningful standardname for the names of your policies.policy.
  5. Under Assignments, select Users, agents or workload identities.
    1. Under What does this policy apply to?, select Agents.
      1. Under Include, select All agent identities.
      2. Under Exclude:
        1. Select, select Select individual agent identities.
        2. UsingIn the enhanced object picker, switch betweenuse the tabs All, Agent blueprint principals, and Agent identities tabs to select the individual agent blueprints and/orapproved agent identities approved for use in your environment.or blueprints.
        3. Select Select.
  6. Under Target resources:
    1. Under > Include, select All resources (formerly 'All cloud apps').
  7. Under Access controls > Grant:
    1. Select, select Block.
    2. Select, and then select Select.
  8. Confirm your settings and setSet Enable policy to Report-only.
  9. Select Create to create your policy..

[!INCLUDE conditional-access-report-only-mode]

Use custom security attributes

Create Conditional Access policy

For more information about assignment options and the object picker, see Target agent identities in Conditional Access policies.

Allow approved agents by using custom security attributes

Use custom security attributes when you need to manage approved agents and resources at scale. The recommended approach forfollowing example blocks agents from resources unless the first scenario is to createagent has the HR_Approved value.

Create and assign custom security attributes to each

Create attributes for agent or agent blueprint,approval status and resource departments, and then target those attributes with a Conditional Access policy. This approach uses steps similar to those documented in Filter for applications in Conditional Access policy. You can assign attributes across multiple attribute sets to an agent or cloud application.the appropriate values.

Create and assign custom attributes

  1. Create the custom security attributes:
    1. Create an Attributeattribute set named AgentAttributes.
    2. Create New attributesan attribute named AgentApprovalStatus that Allow.
    3. Configure the attribute to allow multiple values to be assignedand Only allowonly predefined values to be assigned.
        values.
      1. Add the following predefined values:values New, In_Review, HR_Approved, Finance_Approved, and IT_Approved.
  2. Create another attribute set to group resources that your agents are allowed to access.
    1. Create an Attributeattribute set named ResourceAttributes.
    2. Create New attributesan attribute named Department that Allow.
    3. Configure the attribute to allow multiple values to be assignedand Only allowonly predefined values to be assigned.
        values.
      1. Add the following predefined values:values Finance, HR, IT, Marketing, and Sales.
  3. Assign the appropriate value to resources that youreach agent is allowed to access. For example, you might want only agents that are HR_Approved to be able to access resources that are tagged HR.or agent blueprint and resource.

For more information about custom security attributes, see Custom security attributes in Microsoft Entra ID.

Create the Conditional Access policy

After you completeCreate a block policy that excludes agents with the previous steps, create a Conditional Access policy usingapproved custom security attributes to block all agents except those reviewed and approved by your organization. attribute value.

  1. Sign in to the Microsoft Entra admin center as at least a Conditional Access Administrator and Attribute Assignment Reader.
  2. Browse to Entra ID > Conditional Access > Policies.
  3. Select New policy.
  4. Give your policyEnter a name. Create a meaningful standardname for the names of your policies.policy.
  5. Under Assignments, select Users, agents or workload identities.
    1. Under What does this policy apply to?, select Agents.
      1. Under Include, select All agent identities.
      2. Under Exclude:
        1. Select, select Select agent identities based on attributes.
        2. Set Configure to Yes.
        3. Select the Attribute we created earlier called AgentApprovalStatus. attribute.
        4. Set Operator to Contains.
        5. Set Value to HR_Approved.
        6. Select, and then select Done.
  6. Under Target resources:
    1. Under > Include, select All resources (formerly 'All cloud apps').
  7. Under Access controls > Grant:
    1. Select, select Block.
    2. Select, and then select Select.
  8. Confirm your settings and setSet Enable policy to Report-only.
  9. Select Create to create your policy..

[!INCLUDE conditional-access-report-only-mode]


Block high-risk agentsagent identities

Create a policy that blocks high-risk agent identities from accessing organizational resources

In the second scenario, organizations can create a Conditional Access policy to block high-resources. Agent risk agents based on signals from Microsoft Entra ID Protection. For details on risk detection types and response actions for agents, see Identity Protection for agents.

The following steps create a Conditional Access policy to block all high-risk agents from accessing your organization's resources.is in Preview.

  1. Sign in to the Microsoft Entra admin center as at least a Conditional Access Administrator.Conditional Access Administrator.
  2. Browse to Entra ID > Conditional Access > Policies.
  3. Select New policy.
  4. Give your policyEnter a name. Create a meaningful standardname for the names of your policies.policy.
  5. Under Assignments, select Users, agents or workload identities.
    1. Under What does this policy apply to?, select Agents.
      1. Under Include, select All agent identities.
  6. Under Target resources:
    1. Under > Include, select All resources (formerly 'All cloud apps').
  7. Under Conditions > Agent risk (Preview), set Configure to Yes.
    1. Under Configure agent risk levels needed for policy to be enforced, selectSelect High. This guidance is based on Microsoft recommendations and might be different for each organization.
  8. Under Access controls > Grant.
    1. Select, select Block.
    2. Select, and then select Select.
  9. Confirm your settings and setSet Enable policy to Report-only.
  10. Select Create to enable your policy..

[!INCLUDE conditional-access-report-only-mode]

For details about agent risk detections, see Microsoft Entra ID Protection and agents.

Policies for autonomous agents'agent user accounts

Some autonomous agents can operate like users with their own mailboxes, group memberships, and enterprise identities. These agents use an agent's user account instead of (or in addition to) an agent identity.

Conditional Access extendsAgent-user policy enforcementguidance moved to these user-like autonomous agents. Administrators can:Secure agents that act as users with Microsoft Entra Conditional Access. The article includes the following policies:

  • Target all agent users or select specific agent usersBlock risky agent user accounts
  • Apply policies using custom security attributesRequire a compliant device
  • Apply agent risk conditions to block risky agents
  • Use the agent execution environments condition to scope policies to agents running on endpoints
  • Enforce device compliance for agents running on managed endpoints (Windows 365 Cloud PCs)
  • Enforce compliant network locations for agents with a Global Secure Access clientRequire a compliant network

To create a Conditional Access policy for agents operating with their own identity, use the following settings:

  • Assignments: In an agent access flow, the access token is issued to the agent identity (the token subject), so you assign the policy to agents or their agent identity blueprint.
  • Target resources: Select the resources the agent needs to access.
  • Conditions: Configure whether the agent is at risk. For more information, see ID Protection for agents.
  • Access control: Because this agent accesses resources with its own identity, there's no remediation and the only available option is blocking access.

Block risky agents' user accounts

This policy blocks autonomous agents operating as users when Microsoft Entra ID Protection detects medium or high risk.

  1. Sign in to the Microsoft Entra admin center as at least a Conditional Access Administrator.
  2. Browse to Entra ID > Conditional Access > Policies.
  3. Select New policy.
  4. Give your policy a name. Create a meaningful standard for the names of your policies.
  5. Under Assignments, select Users, agents or workload identities.
    1. Under What does this policy apply to?, select Agents.
      1. Under Include, select All agent users (Preview).
  6. Under Target resources:
    1. Under Include, select All resources (formerly 'All cloud apps').
  7. Under Conditions > Agent risk (Preview), set Configure to Yes.
    1. Under Configure agent risk levels needed for policy to be enforced, select Medium and High.
  8. Under Access controls > Grant.
    1. Select Block.
    2. Select Select.
  9. Confirm your settings and set Enable policy to Report-only.
  10. Select Create to enable your policy.

Require a compliant device for agents' user accounts

Some autonomous agents are computer-using agents. These agents operate a desktop environment to complete tasks, similar to how a human user interacts with applications. They typically run on dedicated Windows 365 Cloud PCs for Agents, which are Intune-managed Windows devices. Because the Cloud PC is a managed endpoint, its compliance status can be evaluated by Conditional Access just like an employee's laptop.

However, not all agents run on endpoints. Agents running directly in Microsoft infrastructure don't have an associated device. Policies scoped with this condition don't apply to those cloud-native agents, which prevents unintended blocking.

The Agent execution environments (Preview) condition solves this by restricting the policy to only apply when the agent user session is initiated from an endpoint. Cloud-native agents without a device are excluded from evaluation entirely.

  1. Sign in to the Microsoft Entra admin center as at least a Conditional Access Administrator.
  2. Browse to Entra ID > Conditional Access > Policies.
  3. Select New policy.
  4. Give your policy a name. Create a meaningful standard for the names of your policies.
  5. Under Assignments, select Users, agents or workload identities.
    1. Under What does this policy apply to?, select Agents.
      1. Under Include, select All agent users (Preview).
  6. Under Target resources:
    1. Under Include, select All resources (formerly 'All cloud apps').
  7. Under Conditions > Agent execution environments (Preview), set Configure to Yes.
    1. Under Include, select Agent user sessions initiated from endpoints.
  8. Under Access controls > Grant.
    1. Select Grant access.
    2. Select Require device to be marked as compliant.
    3. Select Select.
  9. Confirm your settings and set Enable policy to Report-only.
  10. Select Create to enable your policy.

[!INCLUDE conditional-access-report-only-mode]

Require a compliant network for agents' user accounts

Similar to device compliance, you can require agents running on endpoints to connect through a compliant network using Global Secure Access. The Global Secure Access client installed on the endpoint provides the network location signal that Conditional Access evaluates.

Use the Agent execution environments (Preview) condition to scope this policy to endpoint-based sessions only. Without this condition, cloud-native agents without a Global Secure Access client are blocked with no path to compliance.

  1. Sign in to the Microsoft Entra admin center as at least a Conditional Access Administrator.
  2. Browse to Entra ID > Conditional Access > Policies.
  3. Select New policy.
  4. Give your policy a name. Create a meaningful standard for the names of your policies.
  5. Under Assignments, select Users, agents or workload identities.
    1. Under What does this policy apply to?, select Agents.
      1. Under Include, select All agent users (Preview).
  6. Under Target resources:
    1. Under Include, select All resources (formerly 'All cloud apps').
  7. Under Conditions > Agent execution environments (Preview), set Configure to Yes.
    1. Under Include, select Agent user sessions initiated from endpoints.
  8. Under Access controls > Grant.
    1. Select Grant access.
    2. Select Require compliant network.
    3. Select Select.
  9. Confirm your settings and set Enable policy to Report-only.
  10. Select Create to enable your policy.

[!INCLUDE conditional-access-report-only-mode]

Related content

Daily Entra.News

Get daily email updates

Get a concise summary of the latest Microsoft Entra updates delivered straight to your inbox.

Loading the secure signup form…