Live training: next batches coming soon. Join the waitlist:Waitlists open:Developer Training →Developer →Copilot Studio Training →Copilot Studio →

How to Delete or Disable an Agent in Copilot Studio

To delete an agent in Copilot Studio, open the agent, select the … menu at the top, choose Delete agent, type the agent’s exact name and confirm. To only switch it off, an admin can quarantine it and undo that later.

In this tutorial, I’ll show you how to delete an agent in Copilot Studio, the PAC CLI command for the same job, how to disable an agent without losing it, and the errors I hit along the way.

Here’s the one command I used to disable our test agent:

pac copilot-studio set-bot-as-quarantined --environment e908c9f9-0c8b-ea0b-bbc9-84db468050db --bot-id a015e1df-e5d9-4b1e-9229-bc7da6908ff6

It returned "isBotQuarantined": true, and users couldn’t reach the agent until I reversed it.

Method 1: Delete an Agent in Copilot Studio

I built a throwaway agent called SPGuides Test Agent in our Live Training environment, published it, and deleted it. It uses the new GitHub Copilot experience, which is now the default for new agents.

Important: deleting can’t be undone. If you might need the agent again, export it first, which I explain in how to create a solution in Copilot Studio.

Open the agent from the Agents page. Then select the … menu at the top right, next to Review and Publish, and pick Delete agent:

Copilot Studio agent ... menu with Delete agent highlighted for SPGuides Test Agent

The same menu also holds Settings, Hooks, Keyboard shortcuts and Download. There’s no on/off switch anywhere in agent settings, which is why disabling needs a different route.

If your agent uses the classic (standard) experience, the menu sits next to Test and the item is just called Delete:

Standard Copilot Studio agent menu with the Delete option highlighted

Either way, Copilot Studio opens a Permanently delete dialog. It warns that the workspace, topic content and historical metrics go too:

Permanently delete agent dialog in Copilot Studio with Delete agent disabled

The Delete agent button stays grayed out on purpose. Type the agent’s name exactly as shown, and the button turns red:

Agent name typed in the delete dialog so the Delete agent button is enabled

Select Delete agent. Back on the Agents page, our list dropped from 16 items to 15, and the test agent was gone:

Copilot Studio Agents list showing 15 items after the test agent was deleted

Microsoft says the agent’s data is permanently removed after a few minutes. If your license has expired, Copilot Studio shows a Permanently delete your agents option instead.

Method 2: Delete an Agent With the PAC CLI

Admins who clean up many agents can script it. The Power Platform CLI has a delete command in its copilot-studio group (still in preview):

pac copilot-studio delete-copilot-agent --environment <environment-id> --bot-id <agent-id>

Only --bot-id is required. Leave out --environment, and pac uses the environment from your active auth profile.

Note: Microsoft’s Power Platform API page says its delete operation supports only Agent Builder agents, so I deleted our Copilot Studio agent in the UI. If you’re moving an Agent Builder agent instead, see how to copy an Agent Builder agent to Copilot Studio first.

How Do I Disable a Copilot Studio Agent Without Deleting It?

Use quarantine. A quarantined agent stays in Copilot Studio, and makers can still open and test it, but users can’t chat with it in any channel.

It only works on a published agent, so publish the agent in Copilot Studio first. You also need Global admin, AI administrator or Power Platform administrator rights.

First, install the PAC CLI and sign in to the environment. The second command opens a browser sign-in:

dotnet tool install --global Microsoft.PowerApps.CLI.Tool
pac auth create --environment <environment-id>

Next, grab the agent ID. On the GitHub Copilot experience, the ID in the agent’s URL (after /agents/) worked as --bot-id. I saved this as Quarantine-Agent.ps1:

$env = "e908c9f9-0c8b-ea0b-bbc9-84db468050db"     # Live Training environment
$bot = "a015e1df-e5d9-4b1e-9229-bc7da6908ff6"     # SPGuides Test Agent

pac copilot-studio set-bot-as-quarantined --environment $env --bot-id $bot
pac copilot-studio get-bot-quarantine-status --environment $env --bot-id $bot

I ran it in PowerShell 7, and here’s the output:

PAC CLI quarantine command output showing isBotQuarantined true
{
  "isBotQuarantined": true,
  "lastUpdateTimeUtc": "2026-11-03T05:27:22.3821029Z"
}

isBotQuarantined is true, so the agent is blocked. The Agents list still said Published, with no marker at all.

The real sign is in the agent. Open Review, and you’ll see the admin warning:

Copilot Studio Review panel warning Your admin blocked this agent

It reads “Your admin blocked this agent” and says users can’t access it until an admin unblocks it, though you can still publish.

How to Turn the Agent Back On

Same environment, same agent ID, one word changed. Here’s Unquarantine-Agent.ps1:

$env = "e908c9f9-0c8b-ea0b-bbc9-84db468050db"     # Live Training environment
$bot = "a015e1df-e5d9-4b1e-9229-bc7da6908ff6"     # SPGuides Test Agent

pac copilot-studio set-bot-as-unquarantined --environment $env --bot-id $bot
pac copilot-studio get-bot-quarantine-status --environment $env --bot-id $bot

You can see the result in the screenshot below:

PAC CLI unquarantine command output showing isBotQuarantined false
{
  "isBotQuarantined": false,
  "lastUpdateTimeUtc": "2026-11-03T05:29:24.4072518Z"
}

The flag went back to false two minutes later, and the Review warning disappeared. Users could chat with the agent again.

Other Ways to Switch Off an Agent

Quarantine needs an admin. As the agent’s maker, you have two lighter options:

Admins with many agents can also quarantine them from Agent Inventory in the Copilot Agent Kit, up to 50 per bulk action.

What Happens After You Delete an Agent?

The agent disappears for makers and users. Deleting also removes tenant resources tied to it, such as its app registration or Microsoft Entra Agent ID.

I checked from the command line too. Asking pac for the deleted agent’s status returned this:

Entity 'bot' With Id = a015e1df-e5d9-4b1e-9229-bc7da6908ff6 Does Not Exist [HTTP 404 (NotFound)]

That 404 is your proof it’s gone. For more agent guides, browse our Copilot Studio tutorials.

Errors and Fixes

The first time I ran Quarantine-Agent.ps1, the agent was still a draft. pac stopped with this error:

PAC CLI error Draft custom agents cannot be placed in a quarantined state
Error: Draft custom agents cannot be placed in a quarantined state. [HTTP 400 (BadRequest)]

Fix: select Publish in the agent (no channel needed), then run the script again. After publishing, the same command worked.

Delete fails. Conditional Access policies can block removing the app registration and service principals. Microsoft says you might then need to remove those resources from your tenant manually.

HTTP 404 Not Found. The agent ID is wrong, or the agent is already deleted. Copy the ID again from the agent’s URL.

405 Method Not Allowed. Quarantine doesn’t support classic chatbots. Use sharing or channel removal for those.

If you’re tidying up your agents, I’d read these next:

Frequently Asked Questions

How do I delete an agent in Copilot Studio?

Open the agent, select the … menu next to Review and Publish (next to Settings in the standard experience), choose Delete agent, type the agent’s exact name and select Delete agent.

Can I recover a deleted Copilot Studio agent?

No. The dialog warns that the agent and its data won’t be recoverable. Export the agent in a solution first if you might need it again.

How do I disable a Copilot Studio agent without deleting it?

An admin can quarantine it with pac copilot-studio set-bot-as-quarantined or the Power Platform API. Makers can also stop sharing it or remove its channels.

Why does my agent still say Published after quarantine?

The Agents list doesn’t change. Open Review in the agent, and you’ll see the warning Your admin blocked this agent.

Who can quarantine a Copilot Studio agent?

A Global admin, AI administrator or Power Platform administrator, on a published agent. Microsoft explains it in Use the Power Platform API to manage agent quarantine, and the delete steps are in Create and delete agents.