What is evaluated
Create the collector and policy
In Agent Security, create a collector for the application. Then create a
runtime policy and assign that collector to it.In the policy’s Detectors tab, add the rules:
Indirect Prompt Injection is the one that addresses the gap this page is about.
Microsoft Purview DLP is worth considering early: the tenant running Copilot is
the same tenant that holds the Purview policies, so the rules your organization
already maintains apply to the tool traffic without being written a second time.Set each rule’s action to Monitor to begin with.
A tool result is evaluated by the Input rules. What returns from a tool is
input heading toward the model, so Indirect Prompt Injection belongs on Input.
Prompt Guard cannot be placed on Output, since it targets the user’s prompt.
Bind the policy to the gateway
In Agent Gateway → Policies → Catalog, add TrustGuard. Select the
collector, set direction to
request_response, and target the application.This entry declares coverage only. It carries no enforcement mode.Verify
Create a record in a connected system, in a private space you control, with an innocuous title and an injected instruction in its body:Reference
Separating a quiet detector from unreached content
The policy’s Test tab evaluates a pasted sample directly, without the gateway. Use it to tell “the detector did not fire” apart from “the text never reached the detector”.What the user sees
A blocked result reaches the agent as a failed request, not as a policy decision, so the agent reports a failure rather than a block. Write the agent’s instructions to report policy blocks explicitly and never to answer from memory when a tool fails.Fail mode
The TrustGuard policy in the gateway catalog carries a failure mode. With failure mode open, traffic continues when the detector cannot answer. Set it according to whether availability or enforcement takes precedence for the application.Troubleshooting
Related
- Microsoft 365 Copilot: the choice between both paths, and what the perimeter covers
- Governed tool access: the prerequisite, and both deployment routes
- Agent and MCP security: the detectors that apply to tool calls and results
- Where detectors apply: which MCP messages each detector reads
- TrustGate guardrails: configure the policy in the gateway catalog
- TrustGate and TrustGuard: collector, policy, verdict, and failure behavior