Answers · agent controls
Our AI agents run with Microsoft Entra Agent ID identities. If one goes wrong, how do we shut it off: one agent, a whole blueprint, or every agent in the tenant? Does that stop the access tokens it already holds, and where does it show up in the logs?
Last updated
TL;DR: Microsoft Entra Agent ID gives you three off switches. Disable one agent identity, and it can't sign in or get tokens, while the object and its metadata stay in your tenant. Disable an agent identity blueprint, and it blocks the agents made from it and stops new ones from being created; a multi-tenant blueprint can be disabled in all tenants at once. Or use Conditional Access (it needs an Entra ID P1 license) to block token issuance for every agent identity in the tenant, including ones you didn't create, without changing any object. Re-enabling restores access. What none of these pages promise is that a token issued before the switch stops working. They describe blocking sign-ins and new tokens, and Microsoft's token documentation gives access tokens a default lifetime of 60 to 90 minutes. So plan for the gap: stop the agent's process or tool layer too, and treat the first hour as still open.
What should I check, step by step?
1. Know which of your agents have an Entra agent identity. Agents built in earlier versions of Copilot Studio and Azure AI Foundry may be classic applications or service principals, and the agent identity switches don't reach them.
- For one agent: Entra ID > Agents > Agent identities, select it, Disable (at least the Agent ID Administrator role). Owners and sponsors can do the same from the My Account portal, and the admin center can disable several at once.
- For every agent made from one template: Entra ID > Agents > Agent blueprints, select it, Disable. Choose Disable in all tenants only if you own a multi-tenant blueprint and mean to stop it everywhere.
- For the whole tenant: create the Block agent identity authentication Conditional Access policy (All agent identities, All resources, Block). Microsoft's guide has two more templates, for agents' user accounts and for people signing into agents.
- Create Conditional Access policies in report-only mode first, as Microsoft recommends, unless you're responding to a live incident and accept that other agents will stop too.
- Don't stop at Entra: tokens issued before the switch can still reach a resource until they expire, so stop the agent's runtime or block its tool calls as well.
- If the agent was compromised, rotate its credentials before you re-enable it, or retire the identity.
What are the ways to disable an AI agent identity in Microsoft Entra Agent ID?
Microsoft's guide to disabling agent identities (last updated November 2026) separates object-scoped switches from tenant-wide ones. Disabling an agent identity in the admin center stops that one agent from receiving tokens and authenticating, and keeps the identity and its metadata in the tenant. Disabling a blueprint stops new agent identities from being created from it and blocks the existing ones. The management guide adds that a disabled agent can't sign in across Microsoft Entra ID and connected apps, and that re-enabling at any scope restores access and token issuance.
- Conditional Access is the tenant-wide switch. It blocks token issuance for broad categories of identities without modifying any agent or blueprint, and the guide gives three policy templates: block agent identity authentication, block agents' user accounts (agents acting for users with delegated permissions), and block people signing into agents. Applied together, they're the guide's answer to a temporary, reversible hold on all agent authentication. They need an Entra ID P1 license, and they don't stop new agent identities from being created; that takes removing the Agent ID Administrator and Agent ID Developer role assignments and permissions such as AgentIdentity.Create.All.
- When a Conditional Access policy targets agent identities, the only condition available is agent risk (in preview) and the only control is Block access, because an agent can't complete an interactive prompt. Enforcement applies when an agent identity or an agent's user account requests a token. It doesn't apply when a blueprint gets a token to create agent identities.
Does disabling an Entra agent identity stop access tokens it already has?
The Agent ID pages describe what disabling blocks: sign-ins and the issuing of tokens. They don't say that an access token issued before the switch is recalled. Microsoft's access token documentation says the identity platform gives an access token a default lifetime picked at random between 60 and 90 minutes, 75 on average.
- So the identity switch closes the door to new tokens, and the agent's current token can keep calling resources that accept it until it expires. That's enough time for a looping agent to do a lot. Pair the Entra switch with one the agent can't wait out: stop its process, remove it from the tool gateway, or block the specific action at the place every call passes through.
- Microsoft also warns about side effects. Disabling agent identities widely can make existing agents fail, can make Microsoft features that expect agent identities, like Copilot Studio agents and Security Copilot agents, fail or fall back to standard service principals without agent-specific tracking, and can push teams toward less visible identities. For a partial response, the guide suggests blocking specific agents rather than all of them.
Where do Microsoft Entra logs show an AI agent's sign-ins and changes?
Entra logs agent activity under the identity type it's built on. An agent identity's changes appear as service principal events (Update service principal), a blueprint's as application events, and an agent's user account's as user events. The agentType property on initiatedBy, performedBy and targetResources tells you which: agenticAppInstance for an agent identity, agenticApp for a blueprint, agentIDuser for an agent's user account, and notAgentic for everything else. blueprintId ties an agent back to its blueprint.
- Sign-ins carry an agentSignIn record and can be filtered in the admin center (Entra ID > Monitoring & health > Sign-in logs, at least Reports Reader) by Agent type and Is Agent. Microsoft Graph exposes the same data on the beta endpoint. Because an agent can sign in with delegated or app-only permissions, its sign-ins can appear in any of the four sign-in log types.
- Entra ID Protection adds a Risky Agents report, with detections kept for up to 90 days, from which an admin can confirm compromise, confirm safe, dismiss the risk or disable the agent. After a disable, the sign-in logs are where you confirm it worked: new token requests from that agent should stop. Activity with an older token shows up in the logs of the resource it called, not in Entra's sign-ins.
How do I ask Rightshold about this (free, no key)?
Add the MCP server https://www.rightshold.com/mcp to Claude, Cursor, ChatGPT, Grok or VS Code, then ask: “My agent is misbehaving and I've disabled its Entra agent identity. Revoke its Rightshold credential too, so every Rightshold check refuses it now, reason rogue_behavior.”
{
"tool": "revoke_agent",
"arguments": {
"subject_id": "crd_YOUR_AGENT_CREDENTIAL",
"reason": "rogue_behavior",
"note": "Entra agent identity disabled; access tokens issued before that may still be valid"
}
}- Needs your owner account key; it's in the trust toolset (connect to /mcp?toolset=trust). Unlike an Entra disable, revocation is irreversible: resuming means issuing a new credential with a new key. Anyone can check it for free with check_revocation.
- It doesn't disable anything in Microsoft Entra, recall Microsoft tokens or stop calls that never pass through Rightshold. Do those in Entra and in your agent's runtime.
Rightshold isn't affiliated with Microsoft. It doesn't manage Entra tenants, policies or tokens. Behavior is as described in Microsoft Learn's Entra Agent ID guides to disabling agent identities, managing agent identities, Conditional Access for agents and agent sign-in and audit logs, and the Microsoft identity platform's access token reference, all read November 27, 2026; several of these features are in preview and can change, so check the linked pages before relying on them.
What are the sources?
- Microsoft Learn: Disable agent identities in your tenant (Microsoft Entra Agent ID)
- Microsoft Learn: Manage agent identities in your organization (Microsoft Entra Agent ID)
- Microsoft Learn: Target agents in Microsoft Entra Conditional Access policies
- Microsoft Learn: Agent sign-in and audit logs (Microsoft Entra Agent ID)
- Microsoft Learn: Access tokens in the Microsoft identity platform (token lifetime)
Related
- How to build a kill switch for an autonomous AI agent
- Revoking an AI agent's access immediately
- How to temporarily pause an AI agent's spend without revoking its credential
- Making an AI agent's audit log append-only so even an admin can't silently delete entries
Not legal advice. JSON · Markdown · All answers
Get a free API key in one call
No card and no email needed. 100 free credits; the license and policy checks stay free without a key.
curl -s -X POST https://www.rightshold.com/v1/accounts/signup -H "Content-Type: application/json" -d '{"accept_terms":true}'
export RIGHTSHOLD_API_KEY=rs_... # the api_key from the reply (shown once)
curl -s https://www.rightshold.com/v1/licenses/check -H "Authorization: Bearer $RIGHTSHOLD_API_KEY" \
-H "Content-Type: application/json" -d '{"license":"MIT","intended_use":{"commercial_use":true}}'
