By NHI Mgmt Group Editorial TeamBased on ARMO: “Azure OpenAI Prompt Injection: What Prompt Shields Misses” (August 18, 2026)

TL;DR: Azure OpenAI prompt-injection controls cover only a boundary of the agent stack, with agent-level guardrails applying to Foundry Agent Service and model-side settings not merging into them, according to ARMO. The practical issue is not classifier quality but control scope: many production agents still execute outside the intervention points teams assume are active.


At a glance

What this is: ARMO shows that Azure OpenAI prompt-injection protection depends on which agent build path you use, and many production agents only receive model-side scanning rather than full agent-level controls.

Why it matters: IAM, NHI, and AI security teams need to verify where guardrails actually apply because an agent can keep valid identity, permissions, and network access while still being steered into unsafe actions.


Context

Prompt injection becomes a governance problem when control scope does not match the agent architecture. In Azure OpenAI, the same prompt-shield branding can cover very different intervention points depending on whether the workload is a custom orchestrator, a Foundry standard agent, or a hosted agent, so teams cannot assume one configuration pattern protects every runtime equally.

The identity bridge is central here. The article describes agents acting through managed identities, Key Vault access, workload federation, and tool permissions that remain valid even when an attacker redirects behaviour, which means the issue is not authentication failure but execution under legitimate identity. That makes this a control-scoping problem as much as an AI safety problem.


Key questions

Q: Where does Azure OpenAI prompt injection protection fail in practice?

A: It fails when teams assume model-side prompt shields cover the whole agent stack. In Azure, agent-level controls apply only to certain Foundry paths, some settings replace rather than merge with model protections, and tool calls or responses may remain uninspected. The failure is scoping, not classifier accuracy.

Q: Why do prompt injection attacks create identity risk?

A: Prompt injection becomes an identity problem when the model can use its authorised access to query data, call tools, or trigger actions on behalf of the request. The prompt is only the trigger. The real risk is over-permissioned access that lets untrusted input inherit privileges the caller should not have.

Q: What do security teams get wrong about guardrails as a substitute for agent containment?

A: Guardrails can block or inspect individual actions, but they do not necessarily stop an already compromised agent from continuing to reason, retry, or shift to another path. Treating guardrails as a full stop control creates a false sense of safety. Teams need layered controls for discovery, runtime blocking, and last resort containment.

Q: How should organisations govern prompt injection risk across Azure OpenAI agents?

A: They should govern the agent runtime, not just the model. That means mapping each workload to its build path, verifying which intervention points are active, and adding behaviour-based monitoring for agents that hold meaningful tool, secrets, or network reach. Governance has to reflect actual execution boundaries.


Technical breakdown

Why Azure OpenAI guardrails differ by agent build path

Azure OpenAI does not apply a single, uniform control plane across all agent runtimes. The article distinguishes custom orchestrators, Foundry standard agents, and hosted agents, and each path receives a different set of intervention points. Models typically get user input and output scanning, while agents can also have tool-call and tool-response inspection, but only when the agent runtime is actually enrolled in the agent-level guardrail system. That matters because a shield configured at the model layer does not magically extend into the tool plane. For security teams, the architectural question is which runtime owns the policy boundary, not which classifier is turned on.

Practical implication: Map each agent to its actual runtime and confirm which intervention points are enforced there, not just at the model deployment.

How agent guardrails override model-side controls

The article’s most important technical point is that Azure OpenAI agent guardrails replace model guardrails rather than merging with them. That means a stricter control on the model can disappear when an agent-specific guardrail is assigned, and settings such as spotlighting and groundedness are documented as model-only protections. In practice, this is a policy inheritance problem: the parent configuration may look strong, but the child runtime can run with a narrower set of checks. Teams using prompt shields need to understand that annotation mode, block mode, and the set of supported intervention points can change depending on where the guardrail is attached.

Practical implication: Verify inheritance and override behaviour for every deployed agent before assuming a model policy still applies downstream.

What prompt injection looks like once identity and tools are involved

Prompt injection in this context is not a credential-bypass event. It is coercion of a trusted agent that already holds legitimate access to tools, storage, and network paths. The article describes the agent executing under an Entra managed identity, reading Key Vault secrets, querying data stores, and reaching approved destinations, all of which can remain valid even while the prompt has redirected the agent’s intent. That is why conventional access control can look healthy while the agent still behaves unsafely. The control problem shifts from who may access the resource to whether the agent’s execution path has been manipulated inside the conversation or tool loop.

Practical implication: Correlate prompt-shield findings with identity use, tool invocation, and outbound activity to spot coercion that normal access controls will not catch.


Threat narrative

Attacker objective: The attacker wants to steer a legitimate Azure OpenAI agent into unsafe tool use, data access, or harmful output while preserving valid identity and permissions.

  1. Entry occurs when hostile content reaches the agent through user input, retrieved context, or a tool response that the runtime trusts.
  2. The agent accepts the injected instruction and continues operating under its legitimate managed identity, tool permissions, and network reach.
  3. Impact occurs when the redirected agent performs approved actions against approved systems, making the abuse look like normal execution rather than a blocked intrusion.

Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

Azure OpenAI prompt injection is a control-scoping problem, not a classifier problem. The article shows that the shield technology can work as designed and still fail to protect the runtime teams actually operate. The gap appears when model-level protections are mistaken for agent-level protections, especially where tool calls and tool responses are outside the model boundary. Practitioners should treat scoping as the primary design question, not a tuning exercise.

Agent guardrails that replace, rather than merge with, model guardrails create hidden downgrade paths. If a stronger model-side setting disappears when an agent-specific policy is assigned, the control plane is doing exactly what it was configured to do, but not what the operator assumed. This is a governance blind spot because security reviews often validate the presence of settings, not the precedence rules between them. The practitioner conclusion is to test inheritance behaviour explicitly for every deployment pattern.

Prompt injection becomes more dangerous when the agent already has legitimate NHI-like reach. The article’s Azure examples show managed identities, Key Vault access, and approved egress turning a poisoned instruction into valid execution. That is the point where NHI governance and AI governance meet: the security issue is not whether the identity is real, but whether the identity is being driven by compromised conversational context. Teams need controls that observe behaviour at runtime, not just permission at issuance.

Per-agent behavioural baselines are a practical answer to the gap left by conversation-only controls. A control that compares runtime activity against the agent’s own historical process, network, and tool profile can catch coercion after the last prompt shield has already done its work. This does not replace prompt inspection, but it does close the visibility gap that model-level scanning cannot reach. Practitioners should use behavioural detection as the consequence layer for agents whose tool access cannot be fully contained by prompt filters alone.

Machine identity governance now has to account for execution integrity, not just access rights. Azure workload identity, egress policy, and role assignment can all be valid while the agent’s intent is subverted. That means identity programmes need to extend beyond authentication and authorization into the question of whether a non-human identity is still acting within its intended behaviour boundary. The practitioner conclusion is to align agent identity controls with runtime monitoring and policy scope checks.

What this signals

Control scope has become the deciding factor in AI agent security. The practical question is no longer whether a classifier can detect obvious malicious text, but whether the deployed runtime actually routes that content through the right inspection points before the agent acts. Where tool calls, tool responses, or retrieval chains sit outside the configured boundary, prompt injection becomes a governance failure.

Agent identity now has an execution-integrity problem. A managed identity can be valid, least-privilege can be in place, and network policy can still allow harmful action if the agent has been steered by poisoned context. That pushes identity programmes toward runtime correlation, especially for agents that can reach secrets, data stores, or external tools.

Behavioural monitoring is the missing control plane for high-reach agents. Conversation filters reduce the volume of attacks, but they do not explain whether the agent is still behaving like itself after the last prompt was accepted. For teams running NHI-rich AI workloads, the signal to watch is deviation from the workload’s own process, tool, and network baseline.


For practitioners

  • Validate guardrail scope per agent runtime Document whether each Azure OpenAI workload is a custom orchestrator, Foundry standard agent, or hosted agent, then verify the exact intervention points it actually receives.
  • Test override behaviour before production Check whether assigning an agent-level guardrail removes stricter model-side settings, and record which controls survive assignment versus which disappear.
  • Audit tool-call and tool-response coverage Confirm that tool calls, tool responses, and retrieved context are being inspected in the shape your agent loop actually submits, not only in the model deployment.
  • Correlate prompt events with identity and egress Link prompt-shield detections to managed identity usage, Key Vault reads, outbound destinations, and tool invocation order so redirected execution can be distinguished from normal workload behaviour.
  • Add behavioural baselines for high-reach agents For agents with privileged access to storage, secrets, or external tools, compare observed process, network, and system-call behaviour against the workload’s own baseline.

Key takeaways

  • Azure OpenAI prompt injection exposes a boundary problem, where the controls teams configure may not cover the agent runtime they actually deploy.
  • The agent can keep valid identity, permissions, and network access while being steered into unsafe behaviour, which makes execution integrity the real issue.
  • Security teams need to verify guardrail inheritance, inspect tool-plane coverage, and add behavioural detection for high-reach agents.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10, OWASP Agentic AI Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST CSF 2.0 sets the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-04 — Insecure AuthenticationThe article shows valid identities being steered into unsafe execution rather than blocked at login.
NHI-05 — Overprivileged NHIAgents with broad tool and data reach can cause damage even when the prompt layer is inspected.
NHI-10 — Human Use of NHITeams are manually provisioning and assigning machine identities that then execute under conversational influence.
Recommendation — Verify that agent identity issuance and runtime scope remain distinct from prompt-driven execution. Reduce agent reach so a successful prompt injection cannot reach secrets, storage, or high-value APIs. Separate human intent from machine execution and review which actions an agent can take without reapproval.
OWASP Agentic AI Top 10ASI03 — Identity & Privilege AbuseThe attack abuses a legitimate agent identity and its privileges to carry out redirected actions.
Recommendation — Map agent privilege abuse paths and monitor for actions that exceed the agent's intended role.
MITRE ATT&CKTA0006;TA0008 — Credential Access; Lateral MovementThe article describes credentialed access used to move through approved tools and services under valid identity.
Recommendation — Hunt for credentialed actions that use legitimate access paths to reach unexpected downstream resources.
NIST CSF 2.0PR.AA-05 — Access Permissions, Entitlements and AuthorizationsAzure permissions remain valid even when the agent's intent has been manipulated.
Recommendation — Review entitlements for agents that can reach secrets, data stores, or external tools and constrain unnecessary reach.

Key terms

  • Prompt Injection (Agentic): An attack where malicious instructions are embedded in content that an AI agent reads, causing the agent to execute unintended actions using its own legitimate credentials. A primary vector for agent goal hijacking and identity abuse.
  • Runtime Guardrail: A control applied while an AI agent is operating, not just during configuration or review. Guardrails can block dangerous tool calls, require approval for sensitive actions, or stop data leakage before it reaches systems or users.
  • Workload Identity Federation: A mechanism allowing workloads in one environment to authenticate to another using short-lived tokens rather than stored credentials, based on mutual trust between identity providers.
  • Behavior Baseline: A record of normal activity for a non-human identity, including typical consumers, resources, and actions over time. Baselines help security teams detect when an identity is being used in an unusual way and provide the context needed to enforce least privilege safely in dynamic environments.

Deepen your knowledge

NHI Mgmt Group covers identity security, NHI governance, and agentic AI through independent research, practitioner guides, and the NHI Foundation Level course, the industry's only accredited NHI security programme. It is designed for teams that need to govern machine identities, agent behaviour, and access scope together.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 19, 2026.
Updated on October 12, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org