Sandboxing Enterprise AI Agents: Microsoft Execution Containers (MXC) and Entra Agent Identity Blueprints

๐Ÿค– AI Executive Brief & TL;DR MXC 1.0 ยท Entra Agent ID
What you need to know
  • An agent can't police itself. MXC puts an OS-enforced boundary (files, network, UI) around agents and tools, defined in a declarative JSON policy.
  • Containment and identity are two separate layers. MXC limits what an agent can touch on the device. Entra Agent ID (blueprints and agent identities) limits what it can reach in the cloud. You need both.
  • Start with an inventory. List every agent identity blueprint in your tenant with Graph before you write any policy.
Invoke-MgGraphRequest GET "v1.0/applications/microsoft.graph.agentIdentityBlueprint"

Coding agents, browser agents and "do it for me" assistants now run shell commands, edit files and call APIs on users' machines. The security question has shifted from what can the model say to what can the agent do. Microsoft's answer has two parts:

  • Microsoft Execution Containers (MXC), now at a stable 1.0 release: an open-source, policy-driven sandbox for running agents and their tools on Windows, Linux and macOS.
  • Microsoft Entra Agent ID: first-class identities for agents, created from agent identity blueprints, so cloud access is governed like any other identity.

This post explains how the two fit together and what an infrastructure team should do first. For the identity-governance side in depth, see our Entra Agent ID & Agent 365 audit guide and AI agent dynamic permissions runbook.


Two layers of agent control Device layer: MXC JSON policy: readable paths, writable paths, network egress, UI and clipboard access Backends: process container (AppContainer, Seatbelt, Bubblewrap), session container, WSL / microVM, Windows 365 for Agents Answers: what can it touch here? Cloud layer: Entra Agent ID Blueprint = template (application object) Agent identities minted from the blueprint Sponsors, least-privilege app roles, Conditional Access, sign-in and audit logs Agent actions separated from user actions Answers: what can it reach out there? Agent 365 is the management plane that ties device containers and agent identities together.

1. What MXC actually does

MXC separates an agent's execution environment from the host using a declarative policy. The operating system enforces that policy at runtime, not the agent. If a coding agent tries to write outside its allowed directory or call a network endpoint that isn't on its list, the OS denies it ("Access is denied" or a dropped connection), whatever the model decided.

Key points from the 1.0 release:

  • One abstraction, several backends. MXC picks the isolation primitive that fits the task: lightweight process containers (AppContainer on Windows, Seatbelt on macOS, Bubblewrap on Linux), session containers that hide the user's desktop, clipboard and input, WSL or microVM isolation for untrusted code, and cloud instances through Windows 365 for Agents.
  • SDKs for Rust, .NET and TypeScript/Node.js, with versioned entry points such as @microsoft/mxc-sdk/v1, so agent harnesses can request containment directly.
  • Ecosystem adoption. GitHub Copilot CLI, OpenAI Codex, NVIDIA OpenShell, Meta Muse, Claude Code and others have announced support or plans to support it.

What a policy expresses

The exact schema is in the MXC repository. Conceptually, a policy for a coding agent looks like this:

JSON
{
  "_comment": "Illustrative only - check the MXC repo for the exact v1 schema",
  "filesystem": {
    "read":  ["C:\\src\\project"],
    "write": ["C:\\src\\project\\out"]
  },
  "network": {
    "egress": ["api.github.com:443", "registry.npmjs.org:443"]
  },
  "ui": { "clipboard": false, "desktop": false }
}
NOTE:
The snippet above is an illustration of the kinds of rules MXC enforces, not the official schema. Use the published v1 schema from the MXC project when you write real policies.

2. Where Entra Agent ID fits

MXC stops an agent from wandering around the device. It doesn't decide which mailboxes, sites or APIs the agent can call in Microsoft 365. That is Entra's job.

An agent identity blueprint (microsoft.graph.agentIdentityBlueprint) is a specialised application object. It holds the shared configuration (display name, publisher, app roles, credentials, token settings) for a family of agents. Individual agent identities are created from it, and a blueprint principal in your tenant issues their tokens. Every blueprint must have sponsors: named humans who are accountable for it.

The relevant Graph permissions and roles:

TaskGraph permissionEntra role
Read blueprintsAgentIdentityBlueprint.Read.AllAgent ID Administrator / Global Reader
Create blueprintsAgentIdentityBlueprint.CreateAgent ID Developer or Administrator
Manage blueprintsAgentIdentityBlueprint.ReadWrite.AllAgent ID Administrator

3. Inventory agent identity blueprints with PowerShell

POWERSHELL
Connect-MgGraph -Scopes "AgentIdentityBlueprint.Read.All"

$uri = "https://graph.microsoft.com/v1.0/applications/microsoft.graph.agentIdentityBlueprint" +
       "?`$select=id,appId,displayName,createdDateTime"

$blueprints = @()
do {
    $page = Invoke-MgGraphRequest -Method GET -Uri $uri
    $blueprints += $page.value
    $uri = $page.'@odata.nextLink'
} while ($uri)

$blueprints |
    Select-Object displayName, appId, createdDateTime |
    Sort-Object createdDateTime -Descending |
    Format-Table -AutoSize

"Total agent identity blueprints: $($blueprints.Count)"

Lab result (LAB 365 dev tenant): The same call with our existing automation app returned HTTP 403. The app has Directory.ReadWrite.All but not AgentIdentityBlueprint.Read.All. Broad directory permissions don't grant access to agent blueprints. Inventory scripts need the dedicated permission.

Check each blueprint has a sponsor

A blueprint without a sponsor is an orphaned agent waiting to happen:

POWERSHELL
foreach ($bp in $blueprints) {
    $sponsors = Invoke-MgGraphRequest -Method GET `
        -Uri "https://graph.microsoft.com/v1.0/applications/$($bp.id)/microsoft.graph.agentIdentityBlueprint/sponsors"
    if (-not $sponsors.value) {
        Write-Warning "No sponsor: $($bp.displayName) ($($bp.appId))"
    }
}

4. A practical starting plan

  1. Inventory. List blueprints and agent identities (section 3) and the agent tools developers already run locally (Copilot CLI, Codex, Claude Code and similar).
  2. Assign accountability. Every blueprint gets at least one sponsor. Unsponsored blueprints go on a disable list.
  3. Contain on devices. For developer agents that support MXC, require a containment policy that limits writes to the project folder and egress to known package and API hosts.
  4. Restrict in the cloud. Grant agent identities the narrowest app roles possible and target them with Conditional Access for agents.
  5. Monitor. Watch Entra sign-in and audit logs for agent identities, and Defender / Sentinel for agent processes breaking their containment policy.

5. Summary

LayerControlOwner
DeviceMXC containment policyEndpoint / platform team
IdentityAgent identity blueprints, sponsors, app rolesIdentity team
AccessConditional Access for agentsIdentity / security team
VisibilityAgent 365, Entra logs, Defender, SentinelSOC