Our advice as a Microsoft partner specialising in security and identity: first establish whether Microsoft Copilot Studio or Microsoft Foundry (formerly Azure AI Foundry) covers your requirements. Identity management, governance and compliance features are built into both. If a self-hosted agent such as OpenClaw is unavoidable, it belongs in a dedicated, isolated environment with its own identities, not on a managed work PC.
Why we prefer managed platforms
OpenClaw is a self-hosted agent runtime. It can process untrusted content, run skills from external sources and take actions with the credentials assigned to it. In its security analysis of 19 February 2026, Microsoft advises treating OpenClaw as untrusted code execution with persistent credentials.
On managed platforms such as Copilot Studio or Microsoft Foundry, Microsoft provides central security controls. You configure them and remain responsible for data flows and settings, but identity, governance and compliance features are already built in. With a self-hosted runtime such as OpenClaw, responsibility for the host, identities, network, patching and monitoring lies entirely with your organisation.
The risks Microsoft describes
Microsoft names three risks of an unprotected deployment:
- Credential exfiltration: Credentials and accessible data can be exposed or exfiltrated. OpenClaw inherits the trust and risk of the machine and of the identities it can use.
- Manipulated state: The agent's persistent state or “memory” can be altered so that, over time, it follows an attacker's instructions instead of the operator's.
- Host compromise: The host environment can be compromised if the agent is induced to retrieve and run malicious code.
Two supply chains converge in the same execution loop. The first is skills: attackers publish malicious skills on ClawHub, the public skill registry for OpenClaw, and disguise them as useful tools. Installing a skill amounts to installing privileged code. The second is indirect prompt injection: if an agent polls a shared feed, for example via Moltbook, an attacker can embed instructions in content the agent reads. A single crafted post can reach several agents at once.
Microsoft describes the path of a poisoned skill in five stages:
- 1Distribution: The attacker publishes the skill on ClawHub and promotes it through community channels.
- 2Installation: A developer, or the agent itself, installs the skill because it seems relevant to a task.
- 3State access: The attacker obtains tokens, cached credentials, configuration data and transcripts.
- 4Privilege abuse: With valid identity material, the attacker performs actions through standard APIs.
- 5Persistence: The attacker gains a foothold through lasting configuration changes such as new OAuth consents, scheduled runs or modified agent tasks.
OpenClaw does not belong on a work PC
Microsoft recommends running OpenClaw only in isolation: on a dedicated virtual machine or a separate device that is not used for everyday work. A managed work PC holding a person's accounts, files and sessions is exactly the trust the agent would inherit. The same applies to Microsoft 365: a self-hosted agent gets neither personal accounts nor broad rights in the tenant, but its own identity with the minimum permissions its task requires.
Microsoft's minimum requirements and how we implement them
For an evaluation that cannot be avoided, Microsoft sets four minimum requirements: isolation, dedicated credentials, monitoring of the agent's state and rapid rebuild. We implement them with the Microsoft security stack and add one control against persistence through OAuth consents:
| Requirement | Concrete control | Tool |
|---|---|---|
| Run only in isolation | Dedicated VM or separate device with no production data or personal accounts; outbound network traffic, permissions and tools restricted | Dedicated VM, container or network-isolated segment with a minimal attack surface |
| Dedicated credentials | Separate agent identity with minimal rights, short-lived tokens, regular rotation | Microsoft Entra ID with Conditional Access |
| Monitor state | Track process launches, file changes, network connections, token use and stored instructions; correlate endpoint activity with identity and cloud events | Microsoft Defender for Endpoint on the agent host, Microsoft Defender XDR |
| Detect persistence | Inventory OAuth apps, monitor consent drift, alert on risky publishers or permission levels | App Governance in Microsoft Defender for Cloud Apps |
| Rebuild quickly | Reinstall the environment regularly; rebuild it immediately and reset credentials when behaviour looks anomalous | Tested playbook from detection to recovery |
Three operating rules apply as well:
- Do not install any skill until its origin and content have been reviewed.
- Treat documents, feeds and user contributions as untrusted input.
- Decide which actions a person must confirm.
If OpenClaw is already in use
The same tools help when OpenClaw is being used without approval. App Governance shows which OAuth apps have received consents in the tenant and where permissions are changing. Defender XDR links activity on endpoints with identity and cloud events. Then clarify with the people involved whether Copilot Studio or Microsoft Foundry can take over the task. If not, move the evaluation into an isolated environment with its own identity.
What to bear in mind
A container or virtual machine alone is no guarantee against escape or data exfiltration. Test isolation and identity boundaries rather than relying on an architecture diagram, and document responsibilities, logging, patching and incident response. Managed platforms also have their own data flows and configuration duties; we recommend them because the central controls are already in place.
Source
- Microsoft Security Research: Running OpenClaw safely, 19 February 2026

