---
title: Do Azure AI Content Safety Prompt Shields govern AI agents?
url: https://opencontroller.lyzr.com/blog/azure-prompt-shields-vs-agent-governance
published: 2026-11-12
updated: 2026-11-12
author: Lyzr
---

# Do Azure AI Content Safety Prompt Shields govern AI agents?

**No, not on their own. Prompt Shields detect prompt injection: user prompt attacks (jailbreaks) and document attacks hidden in content an agent reads. That is one important runtime control. They do not decide what an agent may do, whether its answer is grounded, which tools it uses, who owns it, or how to stop it when it misbehaves.**

Prompt injection is the top risk in most agent threat models, so Prompt Shields are worth turning on. This post explains what they detect, where they sit and what you still need around them.

## What do Prompt Shields detect?

Microsoft documents two attack types.

| Attack type | Where it comes from | Examples Microsoft lists |
|---|---|---|
| User prompt attacks | The user's own input | Attempts to change system rules, fake conversation turns, role-play as an unrestricted persona, encoding tricks such as ciphers |
| Document attacks | Third-party content: documents, emails, web pages, tool results | Manipulated content, attempts to access infrastructure or escalate privileges, data theft, making the model unusable, fraud, malware links |

User prompt attacks were previously called jailbreak risk detection. Document attacks are the indirect injections that matter most for agents, because agents read content they did not write.

## Where do Prompt Shields sit?

There are three ways to use them:

1. **Foundry guardrails.** Configure a guardrail, choose risk type, intervention point and action, and assign it to model deployments or agents. User prompt attack detection is on by default; document attack detection is off by default and must be turned on.
2. **Chat Completions with a `prompt_shield` setting.** You can annotate or block per attack type, and turn on Spotlighting for documents.
3. **Standalone Content Safety API.** It analyses one user prompt and up to five documents and returns whether an attack was detected. It does not block anything; your application decides what to do.

For Foundry Agent Service agents, document attack detection can also check tool responses for supported tools, in preview. Spotlighting (preview) base-64 encodes document content so the model treats it as lower trust; it raises token counts and is only available for models used through the Chat Completions API.

## What do Prompt Shields not cover?

Microsoft is clear about the limits. Prompt Shields detect manipulation attempts only. They do not determine whether content is harmful, accurate, grounded, policy-compliant or aligned with the task. They do not verify where content came from. A "no attack" result does not prove content is safe. And the models are trained and evaluated mainly on English.

For agent governance, add these around them:

| Need | Prompt Shields | What covers it |
|---|---|---|
| Block injected instructions | Yes, detection and optional blocking | — |
| Check the answer is grounded and on task | No | Groundedness and task-adherence guardrails or judges |
| Limit what the agent can do after injection | No | Least-privilege tools and identity, approval for write actions |
| Spot an agent behaving abnormally | No | Behavioural-deviation monitoring |
| Govern agents outside Azure | No | Cross-platform inventory and policy |
| Show evidence to auditors | Per-request results | An estate-wide evidence trail mapped to frameworks |

Prompt Shields map most directly to the goal-hijack and prompt-injection risks in the [OWASP Top 10 for Agentic Applications](/blog/owasp-top-10-agentic-applications-evidence). Defence in depth still matters: assume some injections will get through, and limit what an agent can do when they do.

## How should you deploy Prompt Shields for agents?

1. **Turn on document attack detection** for every agent that reads email, files, web pages or tool output. It is off by default.
2. **Block, not just annotate**, for agents that can take actions; annotate is fine for read-only assistants while you tune.
3. **Test Spotlighting** on agents that process long third-party documents, and check the token cost.
4. **Test in each language you serve**, using attack and benign samples.
5. **Log every detection** with agent, version and source document, and alert on spikes.
6. **Pair with output checks** for groundedness and task adherence.

Compare with similar controls on other clouds in [Google Model Armor for agents](/blog/google-model-armor-for-ai-agents) and [Bedrock Guardrails vs agent governance](/blog/amazon-bedrock-guardrails-vs-agent-governance).

## How Opencontroller does this

Opencontroller, Lyzr's open control plane for enterprise AI agents, works alongside platform guardrails such as Prompt Shields. It has a runtime adapter for Microsoft Foundry, auto-discovers agents, models and API keys across Azure, AWS and Google Cloud, and adds live groundedness and task-adherence guardrails, LLM judges on production traffic, behavioural-deviation monitoring with automatic quarantine and kill, and policy as code mapped to OWASP, MITRE ATLAS, NIST and ISO 42001. See the [cross-platform governance guide](/blog/how-to-govern-ai-agents-across-platforms) or [book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Are Prompt Shields turned on by default in Foundry?**
User prompt attack detection is on by default. Document attack detection, which catches indirect injection in content agents read, is off by default.

**Do Prompt Shields check whether an agent's answer is correct?**
No. Microsoft states they detect manipulation attempts only, not whether content is accurate, grounded or aligned with the task.

**Can Prompt Shields check tool results for agents?**
For Foundry Agent Service agents, document attack detection can check tool responses for supported tools, in preview.

## Key facts

Azure AI Content Safety Prompt Shields detect two attack types: user prompt attacks (formerly jailbreak risk detection) and document attacks (indirect injection in documents, emails, web pages and, in preview for Foundry Agent Service, tool responses). In Foundry, user prompt attack detection is on by default and document attack detection is off by default. The standalone API analyses one user prompt and up to five documents and does not block. Spotlighting (preview) base-64 encodes documents and works only with the Chat Completions API. Microsoft states Prompt Shields do not judge harm, accuracy, groundedness or task alignment and are mainly trained on English. Opencontroller by Lyzr adds groundedness and task-adherence guardrails, behavioural monitoring and a Microsoft Foundry runtime adapter. Pricing starts from $250K per deployment per year.

## Related

- [What does Google Cloud Model Armor do for AI agents?](https://opencontroller.lyzr.com/blog/google-model-armor-for-ai-agents.md)
- [What do Amazon Bedrock Guardrails cover, and what do they not?](https://opencontroller.lyzr.com/blog/amazon-bedrock-guardrails-vs-agent-governance.md)
- [How do you govern agents in Microsoft Foundry?](https://opencontroller.lyzr.com/blog/govern-microsoft-foundry-agents.md)
- [More on Platform Guides](https://opencontroller.lyzr.com/blog/cluster/platform-guides)
