Copilot Studio prompt injection protection and security risks

How Copilot Studio blocks user and cross-domain prompt injection at runtime, what external threat detection (preview) adds, its one-second default and data sharing, and the pre-publish scan for makers.

On this page

Does Copilot Studio protect agents against prompt injection?

A security lead deciding whether makers may publish agents that read knowledge sources and call tools should start from one fact: Copilot Studio custom agents include built-in protection against user prompt injection (UPIA) and cross-domain prompt injection (XPIA), and Microsoft documents that these are blocked at runtime. The optional external threat detection layer is a separate control. It is in preview, it is configured per environment by a Power Platform Administrator with no tenant-wide switch, and it applies only to agents using generative orchestration. Confirm which of your agents use generative orchestration before you assume that layer covers them.

The built-in layer is managed by Microsoft. Your organization does not get a documented way to see its detection decisions, tune its sensitivity, add its own rules, or review which injection attempts were blocked, based on the Microsoft Learn material this page draws on. Ask Microsoft and your account team what telemetry about blocked injection attempts reaches your tenant, where it appears (for example, in maker audit logs in Microsoft Purview), and whether it is retained long enough for your incident process. Do not record the built-in protection as an operational control you can verify until those answers are in writing.

The review still has to cover what the platform cannot judge for you. Check every knowledge source, tool and action an agent can reach, and limit each to the data and operations the business case requires. Use the automatic security scan that shows makers warnings and risk findings for knowledge, tools and actions before publishing, and require that findings are resolved or accepted by a named owner. If you enable external threat detection, decide the error behavior in advance: when the detection service does not answer within one second, the tool runs by default unless an admin sets the behavior to block the query. Document that choice, and note that each proposed tool call and its surrounding chat history is sent to the detection provider you choose.

Prompt injection controls by capability and licensing

This table compares each prompt injection control by whether it is built into custom agents, what a Power Platform Administrator must configure, whether it sends data to an outside endpoint, and its release status. Read the admin and endpoint column first, because controls that depend on configuration or an external provider are the ones most likely to be left unset. The main takeaway is that built-in protection needs no action, while external threat detection is a preview setting that adds a data-sharing path you must approve.

CapabilityIncluded in custom agentsAdmin action and outside endpointStatus
Built-in UPIA and XPIA protectionYesNo admin action documented; no outside endpointDocumented as built in
External threat detectionNoPower Platform Administrator enables it; sends each tool call to a chosen endpoint, such as Microsoft DefenderPreview
Per-environment configurationNoSet by a Power Platform Administrator for each environment; no tenant-wide settingPreview
Generative orchestration requirementNoApplies only to agents using generative orchestration; confirm agent orchestration type before relying on itPreview
One-second error behaviorNoIf no response within one second, the tool runs unless admins set the error behavior to blockPreview
Pre-publish automatic security scanYesMakers review warnings and risk findings for knowledge, tools and actions before publishingConfirm current status with Microsoft
Licensing and edition coverageNot applicableThe pricing page does not describe these controls; confirm edition coverage with MicrosoftConfirm with Microsoft

How runtime blocking and threat detection work together

Copilot Studio protects custom agents in two layers. The first is built-in protection that Microsoft Learn describes as blocking user prompt-injection attacks (UPIA) and cross-domain prompt-injection attacks (XPIA) at runtime. Makers do not switch this on, and it covers the agent's own behavior without any extra configuration. The second layer is optional and still in preview: external threat detection. When an admin enables it, each tool call the agent proposes is sent to a detection endpoint that you choose, such as Microsoft Defender, and that endpoint returns allow or block before the tool runs. The built-in layer is therefore not a substitute for the external check, and the external check is not a substitute for reviewing what the agent is allowed to call in the first place. Confirm with Microsoft exactly which protections apply to your agent types and licenses before relying on either layer as a control.

The decision is made per tool call, at the point the agent is about to act, so it is the place where a hostile instruction hidden in a web page, document or email would be stopped before it reaches a connector. Because the check happens inline, the detection provider is part of the agent's execution path. Microsoft Learn states that the provider receives recent prompts and chat history, prior tool outputs, user and tenant identity, and the proposed tool inputs. That list matters for your data review: it means business content from earlier turns and from connected systems can leave the Copilot Studio service boundary for a third-party or separately governed endpoint. Ask who operates the endpoint, where it processes that data, how long it is retained, and whether it falls under the same data protection terms as Copilot Studio.

Timing is the second thing to check. Microsoft Learn states that if the detection system does not respond within one second, the tool runs by default unless admins set the error behavior to block the query. Treat that setting as a security decision, not a performance default, and document who owns it. External threat detection is configured per environment by a Power Platform Administrator, with no tenant-wide switch, and it applies only to agents using generative orchestration. Any environment where it is not enabled, or where the error behavior permits execution, needs its own risk acceptance and monitoring.

Tool call decision path with external threat detection

The path starts when a user prompt or retrieved knowledge enters the agent and the orchestrator proposes a tool call. When external threat detection is enabled for the environment, the proposed call goes to the detection endpoint the customer chose, such as Microsoft Defender, which returns allow or block. If no answer arrives within one second, the error behavior set by the admin decides the outcome: the tool runs by default unless the admin chose to block. Check that setting first, because it determines whether a slow or unavailable detector fails open or fails closed.

Proposed tool calls pass through external detection before any tool runs.

Gaps a security reviewer must cover

Built-in protection against prompt injection is only part of the picture. External threat detection is a preview feature with its own timing, scope and data-sharing terms, and the maker scan only runs before publishing. The cards below list each gap and the control a reviewer can put in place around it.

External detection is still preview

External threat detection is labeled preview in Microsoft Learn, so its behavior and settings may change before general availability. Do not treat it as a settled control in a production approval. Ask Microsoft which features are in preview in your tenant, record that status in your risk register, and set a review date to recheck the feature. Keep the runtime protection that Copilot Studio describes as built in as your baseline control.

Preview setup docs

One-second default allows the tool

If the detection endpoint does not respond within one second, the tool runs by default unless the error behavior is set to block the query. A slow or unreachable provider therefore fails open. Check the error behavior setting for every environment where detection is enabled, and set it to block where your risk tolerance requires it. Then test the configuration with the provider unavailable to confirm the outcome you expect.

No tenant-wide detection setting

A Power Platform Administrator configures external threat detection per environment, and there is no tenant-wide switch. An environment that was missed during rollout will run without it. Build an inventory of environments, record the detection setting and error behavior for each, and make the inventory part of environment creation so new environments inherit the approved configuration. Pair this with data policy enforcement, which applies across tenants, so that the controls you rely on are not environment-specific.

Generative orchestration only

External threat detection applies only to agents that use generative orchestration. Agents built on other orchestration paths are outside its scope, even in an environment where detection is turned on. Before approving a rollout, list which agents use generative orchestration and which do not. For the out-of-scope agents, rely on the runtime protection Copilot Studio describes for custom agents, and restrict their tools, knowledge sources and publishing channels through data policies.

Chat history shared with the provider

The detection provider receives recent prompts and chat history, prior tool outputs, user and tenant identity, and the proposed tool inputs. Those fields can include personal data, customer records or confidential business content from the conversation. Before enabling detection, confirm with Microsoft and your chosen provider where that data is processed, how long it is kept and whether it is used for other purposes. Involve your privacy team in the decision, and document the data flow in your records of processing.

Maker scan is not monitoring

The automatic security scan gives makers warnings and risk findings for knowledge, tools and actions before they publish. It runs at publish time and does not watch agents after release. A clean scan does not show that a published agent is safe from injected content in later conversations. Use Microsoft Purview audit logs for maker activity and Microsoft Sentinel to monitor and alert on agent activity after publishing, and require the scan result to be recorded before any agent goes live.

Security and governance docs

How the prompt injection review differs by agent use

Internal agents are built by makers and used only by staff inside your tenant. Copilot Studio includes built-in protection against user prompt injection (UPIA) and cross-domain prompt injection (XPIA) for custom agents, and Microsoft documents that these are blocked at runtime. For internal use, the main question is whether that built-in protection is enough for the tools and knowledge the agent touches, and whether you need the optional external threat detection layer on top.

  • Built-in protection first: Confirm which agents are custom agents and that the protection applies to the tools and knowledge each one uses.
  • Licensing context: Microsoft's pricing page states that Copilot Studio is included with Microsoft 365 Copilot for building and using internal agents, so the review often covers many low-visibility makers.
  • Pre-publish scan: Makers see security warnings and real-time risk findings for knowledge, tools and actions before publishing, so require makers to act on those findings.
  • Environment scope: External threat detection is set per environment by a Power Platform Administrator, so decide which internal environments need it.
  • Generative orchestration: Threat detection applies only to agents using generative orchestration, so inventory which internal agents use it.

Check which internal agents use generative orchestration and which tools they can call before deciding whether the built-in protection alone meets your risk tolerance.

Order of work before approving makers to publish

This sequence settles which agents rely on external threat detection, sets a deliberate fail-open or fail-closed choice, and confirms that scan findings and audit trails are in place before any maker publishes. Each step closes with a check the reviewer can confirm.

  1. Inventory agents that use generative orchestration

    Before anything else, the Copilot Studio owner lists each agent in the target environments and records whether it uses generative orchestration. External threat detection (preview) applies only to these agents, so this list defines the scope of every later step. Owners should also note which agents use knowledge sources, tools and actions, because those are the surfaces the security scan reviews. The output is a short inventory that the security reviewer signs off, and any agent outside generative orchestration is documented as relying on the built-in protection alone.

  2. Choose the external detection endpoint and its data terms

    Security and privacy leads select the detection endpoint, such as Microsoft Defender, and review the terms under which it receives data. Microsoft Learn states that each proposed tool call is sent to that endpoint along with recent prompts and chat history, prior tool outputs, user and tenant identity, and the proposed tool inputs. Reviewers should confirm retention, access and processing terms for that provider in writing and document whether that data sharing is acceptable for each agent's content. The closing check is an approved endpoint record that names the provider and the data categories it receives.

  3. Set the error behavior explicitly

    Microsoft Learn states that if the detection system does not respond within one second, the tool runs by default unless the admin sets the error behavior to block the query. The admin team decides, per agent category, whether a missed response should allow or block the call, and records the reason. Agents that can change records or send messages usually warrant a documented decision against the default, but the choice belongs to the risk owner. The closing check is a written setting decision for each environment, confirmed in the configuration before enablement.

  4. Enable detection per environment as a Power Platform Administrator

    A Power Platform Administrator turns on external threat detection in each environment that will host the approved agents. Microsoft Learn states that the setting is per environment and there is no tenant-wide switch, so each environment must be handled separately and none can be assumed covered by another. The administrator records the environment name, endpoint, error behavior and the date of change. The closing check is a configuration export or screenshot for each environment that the reviewer compares with the approved decisions from earlier steps.

  5. Have makers review the automatic security scan findings

    Makers open each agent before publishing and work through the warnings and real-time risk findings that Copilot Studio shows for knowledge, tools and actions. Microsoft Learn states that these findings appear through the automatic security scan before publishing. Makers should remove or restrict flagged sources and tools, or escalate them to the security owner if the finding cannot be resolved. The closing check is a dated record for each agent showing every finding, the action taken, and the name of the maker and the reviewer who accepted it.

  6. Route maker audit logs to Purview and Sentinel

    The compliance team confirms that Copilot Studio maker audit logs flow into Microsoft Purview, which Microsoft Learn describes as giving admins full visibility into them. The security operations team then configures Microsoft Sentinel to monitor and alert on agent activities, including the blocked calls produced by detection. Alert owners should be named and tested with a non-production event. The closing check is a working alert rule, a documented owner and a retention setting that the compliance lead has approved for the audit data.

  7. Retest after changes to tools or knowledge sources

    Any change to a tool, action, knowledge source or the detection configuration sends the agent back through the scan review and a test of blocked and allowed calls. Owners should ask whether the vendor has changed the scan behavior or the detection preview scope, and confirm this against the current Microsoft Learn documentation rather than memory. The closing check is a change record that links the modification to a fresh scan result and a passing test, and the approver then authorizes the publish action for that agent version.

Evidence a security reviewer asks for

This table lists the evidence a reviewer should request for prompt injection protection in Copilot Studio, the place each item comes from, and what to confirm in the tenant. Read it as a request list: each row names an artifact to collect before approving makers to publish agents. The main takeaway is that the built-in runtime protection is documented, but the detection, error behavior and logging settings are configured by admins and must be verified in each environment.

Evidence itemWhat to ask forWhere it comes from
Runtime protection statementWritten confirmation that custom agents block user prompt injection (UPIA) and cross-domain prompt injection (XPIA) at runtime, and which agent types and orchestration modes this coversMicrosoft Learn security and governance article for Copilot Studio
External detection settings per environmentA list of every environment with external threat detection enabled, the detection endpoint chosen (such as Microsoft Defender), and the named Power Platform Administrator who set itPower Platform admin center, configured per environment, as described in the external threat detection article
Error behavior settingConfirmation of whether the error behavior is set to block the query when the detection system does not respond within one second, or left at the default that runs the toolExternal threat detection configuration in the Power Platform admin center
Data shared with detection providerThe provider's data handling terms, retention period, and whether prompts, chat history, prior tool outputs, user and tenant identity, and proposed tool inputs are sent for each agent that uses detectionDetection provider contract and documentation, plus the data description in the external threat detection article
Maker scan findings recordsEvidence that makers reviewed the automatic security scan warnings and real-time risk findings for knowledge, tools and actions before each publish, and how unresolved findings were handledCopilot Studio authoring canvas during publishing, as described in the security and governance article
Audit log export and alert rulesProof that maker audit logs flow to Microsoft Purview and that alert rules in Microsoft Sentinel cover agent activity, including blocked tool calls and who receives alertsMicrosoft Purview audit log search and Microsoft Sentinel workspace configuration
Governing contract termsCopies of the executed Microsoft Product Terms and Data Protection Addendum that apply to your tenant, and confirmation of which Copilot Studio license terms cover your external publishingYour Microsoft commercial agreement, as cited in the security and governance article

Questions buyers ask before approving prompt injection controls

Is the built-in prompt injection protection in Copilot Studio enough?

Copilot Studio custom agents include built-in protection against user prompt injection (UPIA) and cross-domain prompt injection (XPIA), and Microsoft documents that these are blocked at runtime. That protection is a platform control you do not configure, so it is a reasonable baseline but not a complete control set for your risk. It does not decide which knowledge sources, tools and actions a maker connects, what those tools can write, or which data an agent can reach. Treat it as one layer. Pair it with the pre-publish security scan, data policies that limit connectors and channels, and least-privilege credentials for every action the agent can take. Ask Microsoft to confirm the current scope of the built-in protection for your agent types before you rely on it in a written control statement.

What does external threat detection add, and how much effort does it take?

External threat detection (preview) adds a second decision point: each proposed tool call is sent to a detection endpoint you choose, such as Microsoft Defender, which returns allow or block. The added effort comes from choosing and running that endpoint, agreeing on its ownership and logging, testing blocked and allowed paths in a non-production environment, and deciding how your security operations team will handle the alerts it produces. Cost drivers include the licensing and consumption of the detection service itself, which you should confirm with its vendor, and the Copilot Credit consumption of your agents. Copilot Credit capacity packs are listed at 25,000 credits for $200 per pack per month on Microsoft's pricing page, as of November 2026, with pay-as-you-go and pre-purchase options also available. Ask for a written estimate of how many tool calls your agents make per month.

Can the one-second default for external threat detection be changed?

Yes. Microsoft documents that if the threat detection system does not respond within one second, the tool runs by default unless an admin sets the error behavior to block the query. Your choice is therefore a fail-open or fail-closed decision. Fail-closed protects against a detection outage at the cost of blocked legitimate tool calls during that outage, so it needs an owner who will watch availability and a defined process for users when queries are refused. Fail-open keeps agents working but accepts that tool calls may run unchecked during slow or failed responses. Decide this per environment with your security and business owners, document the reason, and confirm the exact configuration steps in the Microsoft Learn article on external threat detection before the change is made.

What data leaves the tenant when external threat detection is on?

Microsoft documents that the threat detection provider receives recent prompts and chat history, prior tool outputs, user and tenant identity, and the proposed tool inputs. That means content that may include personal data, business records or outputs from internal systems can leave the Copilot Studio boundary for the endpoint you chose. Before you enable it, your privacy and legal teams should confirm the provider's terms, data location, retention and sub-processors, and whether the transfer fits your data protection assessment and any GDPR or sector rules that apply to your data. Also confirm which environments are in scope, because the setting is applied per environment and there is no tenant-wide switch. Limit the data flow by keeping sensitive agents out of scope until the review is complete.

Who has to configure prompt injection controls in Copilot Studio?

External threat detection is configured per environment by a Power Platform Administrator, and it applies only to agents that use generative orchestration. Makers do not control it, but they do act on the pre-publish security scan, where they see warnings and real-time risk findings for knowledge, tools and actions before publishing. Security operations owns the detection endpoint and its alerts. Compliance owns the evidence that the controls are in place. Give each role a written responsibility, because a gap usually appears where an admin assumes the maker fixed a finding and the maker assumes the admin set the environment. Name one owner for the one-second error behavior, since that setting decides what happens during an outage.

Can our own team run this security review without outside help?

Often yes, if you have staff who can configure Power Platform environments, read the Microsoft Learn documentation, and test agents against prompt injection scenarios. The work is mostly controlled testing, documentation and governance, which an internal team can handle. Teams often need outside help with adversarial testing of agents that reach sensitive tools, with designing the fail-open or fail-closed decision, and with writing evidence for an assessment. DeployOpen runs security testing that covers AI systems and agents, including red teaming, under a written, fixed scope agreed before work starts. It also prepares controls and evidence for compliance assessments, but it does not issue audit reports or certifications. Ask any provider for a written scope that names the agents, environments and test cases covered.

Which official pages to check each claim against

Before you approve Copilot Studio prompt injection controls, check each claim against the Microsoft Learn page that owns it. The external threat detection (preview) article is the source for every statement about the optional detection endpoint: how each proposed tool call is sent for an allow or block decision, the one-second timeout and its default of running the tool, the per-environment setting that a Power Platform Administrator controls, and the list of data sent to the provider. Read that page for the current error behavior before you write any policy, because the default that lets a tool run after a timeout is the setting most likely to be misread.

The security and governance article supports the baseline claims: that Copilot Studio custom agents include built-in protection against user prompt injection (UPIA) and cross-domain prompt injection (XPIA) attacks that are blocked at runtime, and that it is governed by your commercial license agreements, including the Data Protection Addendum. Use it to confirm what is native to the service and what depends on configuration you own. Also check the automatic security scan description there, which states that makers see warnings and real-time risk findings for knowledge, tools and actions before publishing. Record the date you checked each page, since preview behavior can change between reviews.

Treat these pages as the reference for the decision, and ask Microsoft or your account team to confirm anything they leave open, such as whether external threat detection is available in your tenant's regions, which detection providers you may select, and how the provider handles the data it receives. Keep a short register that maps each claim you rely on to its page, its section heading and the person who verified it. When the page and a vendor summary disagree, the Microsoft Learn text governs your approval.

How DeployOpen tests Copilot Studio agents before rollout

DeployOpen plans, implements, tests and documents self-hosted open-source platforms inside the client's own infrastructure, and runs security testing that includes AI systems and agents. For Copilot Studio prompt injection protection and security risks, we start from the written scope, test what the agent can reach and do, and hand over documented evidence that your security and governance teams can review.

How we scope

  • We agree the agents, knowledge sources, tools and actions in writing before any testing starts.
  • We record which environments, makers and data policies apply, and whether external threat detection is in scope.
  • Engagements are fixed-scope, so deliverables and timelines are confirmed in writing before work begins.

How we build

  • We configure test agents in a non-production environment that mirrors the setup you intend to publish.
  • We run user prompt injection and cross-domain prompt injection test cases against each tool and knowledge source in scope.
  • We review the pre-publish security scan findings and record how each warning was resolved or accepted.

How we hand over

  • You receive a written report of test cases, observed agent behavior, findings and recommended fixes.
  • We document the configuration settings used, including threat detection error behavior, so your team can reproduce them.
  • We prepare evidence and controls for your own compliance assessment, which independent auditors and certification bodies perform.

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer after handover.
  • A retainer can cover re-testing when agents, tools or knowledge sources change after publication.
  • We confirm with your platform team which vendor features, such as preview capabilities, are still current before each review.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.