Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Use Conditional Access to control access for autonomous agents that authenticate with their own agent identity and no signed-in user. This access pattern includes agents that run in the background, respond to events, run on a schedule, or are published for public use without delegated user context.
In this access pattern, the access token's subject is the agent identity. Conditional Access policies therefore target the agent identity, not a user or an agent's user account.
Before you start, review the licensing, role, and agent setup requirements.
Prerequisites
- One of the following license plans:
- Microsoft 365 E7, which includes Agent 365 and Microsoft Entra Suite, to protect access for both users and agents.
- Microsoft Agent 365, paired with:
- Microsoft Entra ID P1 or Microsoft 365 E3 for Conditional Access.
- Microsoft Entra ID P2 or Microsoft 365 E5 when using agent risk-based Conditional Access.
- At least the Conditional Access Administrator role.
- At least one agent identity registered in your tenant.
- The agent uses the autonomous app OAuth flow.
Important
Before configuring a Conditional Access policy, read the Conditional Access for agents article. It covers the authentication, service boundaries, and limitations to ensure you cover all scenarios and your corporate data and services are well protected.
Allow only specific agents to access resources
Create a block policy that excludes approved agent identities or agent identity blueprints. Start in report-only mode so you can review the policy's effect before you enforce it. You can do this by tagging agents and resources with custom security attributes targeted in your policy, or by manually selecting them using the enhanced object picker.
Create Conditional Access policy using the enhanced object picker
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 you want to scope in the policy.
- Sign in to the Microsoft Entra admin center as at least a Conditional Access Administrator.
- Browse to Entra ID > Conditional Access > Policies.
- Select New policy.
- Give your policy a name. Create a meaningful standard for the names of your policies.
- Under Assignments, select Users, agents or workload identities.
- Under What does this policy apply to?, select Agents.
- Under Include, select All agent identities.
- Under Exclude:
- Select Select individual agent identities.
- Using the enhanced object picker, switch between the All, Agent blueprint principals, and Agent identities tabs to select the individual agent blueprints, agent identities, or both that you want to exclude.
- Select Select.
- Under What does this policy apply to?, select Agents.
- Under Target resources:
- Under Include, select All resources (formerly 'All cloud apps').
- Under Access controls > Grant:
- Select Block.
- Select Select.
- Confirm your settings, and set Enable policy to Report-only.
- Select Create to create your policy.
After confirming your settings using policy impact or report-only mode, move the Enable policy toggle from Report-only to On.
For more information about assignment options and the object picker, see Target agent identities in Conditional Access policies.
Block high-risk agent identities
Create a policy that blocks high-risk agent identities, based on signals from Microsoft Entra ID Protection, from organizational resources. For details on risk detection types and response actions for agents, see Identity Protection for agents. Agent risk is in Preview.
- Sign in to the Microsoft Entra admin center as at least a Conditional Access Administrator.
- Browse to Entra ID > Conditional Access > Policies.
- Select New policy.
- Enter a name for the policy.
- Under Assignments, select Users, agents or workload identities.
- Under What does this policy apply to?, select Agents.
- Under Include, select All agent identities.
- Under What does this policy apply to?, select Agents.
- Under Target resources > Include, select All resources (formerly 'All cloud apps').
- Under Conditions > Agent risk (Preview), set Configure to Yes.
- Under Configure agent risk levels needed for policy to be enforced, select High. This guidance is based on Microsoft recommendations and might be different for each organization.
- Under Access controls > Grant, select Block, and then select Select.
- Set Enable policy to Report-only.
- Select Create.
After confirming your settings using policy impact or report-only mode, move the Enable policy toggle from Report-only to On.
For details about agent risk detections, see Microsoft Entra ID Protection and agents.
Policies for agent user accounts
To create policies for an agent that access resources through its own user account, find agent-user policy guidance in Secure agents that act as users with Microsoft Entra Conditional Access. The article includes the following policies: