Skip to content
  1. Home
  2. AI agents
  3. Security threats to agents
  4. Data protection for agents

Govern and secure · Security threats to agents

Data protection for AI agents: DLP, labels, residency and retention

Data protection for AI agents means controlling what data an agent can read, what it may send to a model or a tool, where that processing happens, and how long prompts, outputs and logs are kept. The agent inherits every permission mistake the company already has, so most of the work starts with permissions and labels.

In this guide: 83 pages

Key takeaways

  1. An agent that searches for a user surfaces whatever that user can reach, and finds it fast. Fix oversharing first; Microsoft's Restricted Content Discovery hides chosen SharePoint sites from Copilot and org-wide search without changing permissions while you clean up.
  2. Masking often stops at the model. Bedrock Guardrails PII masking does not apply to model invocation logs, tool-call arguments, tool results or tool definitions, and tool calls are where agent data moves.
  3. Residency depends on the endpoint you call. Global inference profiles and global endpoints can process anywhere, and Microsoft states that Anthropic models in Microsoft 365 Copilot sit outside the EU Data Boundary.
  4. Vendor retention changed in 2026. Amazon Bedrock now has explicit data retention modes, and some newer models require a mode in which AWS may keep prompts and completions for up to 30 days for human review.
The path data takes through one agent requestFive boxes left to right, each with its control and the gap that control leaves. Sources: permissions and labels; gap, overshared links surface in answers. Prompt: DLP blocks sensitive information types; gap, files uploaded into a prompt. Model: processing region and retention mode; gap, global endpoints can route anywhere. Tool calls: your own check on arguments; gap, Bedrock Guardrails masking skips tool data. Logs and memory: retention and erasure; gap, memory can outlive the conversation.Control at each stepSourcespermissionsand labelsPromptDLP blockssensitive typesModelregion andretention modeTool callsyour own checkon argumentsLogs, memoryretention anderasureGap it leavesOvershared linkssurface in answersFiles uploadedinto a promptGlobal endpointsroute anywhereBedrock masksskip tool dataMemory outlivesthe conversationThe path data takes through one agent requestFive boxes left to right, each with its control and the gap that control leaves. Sources: permissions and labels; gap, overshared links surface in answers. Prompt: DLP blocks sensitive information types; gap, files uploaded into a prompt. Model: processing region and retention mode; gap, global endpoints can route anywhere. Tool calls: your own check on arguments; gap, Bedrock Guardrails masking skips tool data. Logs and memory: retention and erasure; gap, memory can outlive the conversation.SourcesControl: permissions and labelsGap: overshared links surfacePromptControl: DLP on sensitive typesGap: files uploaded to a promptModelControl: region, retention modeGap: global endpointsTool callsControl: your check on argumentsGap: Bedrock masks skip toolsLogs, memoryControl: retention and erasureGap: memory outlives the chat
The path data takes through one agent request, from source to logs, with the control at each step and the gap each control leaves.

Why do agents make oversharing worse?

Because an agent that retrieves on behalf of its user reads with that user's permissions and searches faster and wider than the user ever would, so content that was overshared but never found now turns up in answers. The permission model is the boundary, and the model provider cannot see it.

Microsoft's guidance is to run data risk assessments before switching agents on. The Purview assessment scans the top 100 SharePoint sites every week by default, with custom item-level scans for the rest, and the fixes are links, labels and permissions. Restricted Content Discovery hides chosen sites from org-wide search and Copilot without touching their permissions; it needs a Copilot licence and SharePoint Advanced Management, and propagation for sites with more than 500,000 items can take over a week.

Labels travel with content when they carry encryption. Copilot and agents return encrypted, labelled content only when the user holds both the EXTRACT and VIEW usage rights; new content Copilot creates inherits the highest-priority label among its sources; Double Key Encryption content is never accessible to Copilot. Mind the gaps: items do not inherit container labels set on Teams, sites or groups, and Copilot does not recognize Teams meeting and chat labels.

Custom agents need the same boundary built in. For retrieval agents, Azure AI Search can enforce Purview labels at query time, and Foundry IQ runs queries under the caller's Entra identity; the permission-aware retrieval page of this guide covers the design.

Where should DLP sit for an agent?

At the AI boundary in both directions, on the prompt and on the response, and at every tool call that carries data out. Most products cover the first two well and the tool call poorly, so the tool call is where you add your own check.

Data loss prevention control points for an agent, with what each cloud offers on 2 Nov 2026 and the gap the vendor documents.

Control pointMicrosoftAWSGoogle CloudDocumented gap
PromptPurview DLP for Microsoft 365 Copilot blocks prompts with sensitive information types (preview, rolling out)Bedrock Guardrails sensitive information filters block, mask or detect, set separately for input and outputModel Armor with Sensitive Data Protection templatesCopilot DLP cannot scan files uploaded straight into a prompt
GroundingExclude labelled files and emails from Copilot; block web search grounding for sensitive prompts; exclude external email (preview)Find sensitive data in S3 knowledge sources with Amazon MacieNot covered by a DLP feature on the pages we readExcluded items can still appear in citations
ResponseGenerated content inherits the highest-priority source labelGuardrails output filtersModel Armor response screeningCopilot DLP policy changes take up to four hours to apply
Tool callDefender real-time protection blocks secret exfiltration on tool calls (Foundry and Copilot Studio agents in preview)AgentCore Policy can apply Guardrails at the gateway (July 2026)Model Armor on Agent Gateway (GA 24 Jun 2026)Bedrock Guardrails masking does not evaluate tool arguments, results or definitions
Custom appsPurview policies for Foundry apply only to calls carrying user context; app-only calls get audit onlyThe ApplyGuardrail API, callable from any appModel Armor called by your appFoundry apps without user context get Purview audit only

For custom agents, pass the user's context so Microsoft's data security policies apply, and add your own check on tool arguments for the data classes that must never leave. Bedrock Guardrails masking stops short of the tool call, and the tool-call checks in the table work only where you configure them.

Where does an agent's data get processed and stored?

Wherever the endpoint you call sends it, which can differ from the region you deployed in. Pick regional or geographic endpoints on purpose, block the global ones by policy where residency matters, and check each third-party model you add.

On Amazon Bedrock, geographic cross-Region inference profiles (us, eu, apac, in) keep processing within a geography while data at rest stays in the source Region, and CloudTrail logs each request in the source Region with additionalEventData.inferenceRegion showing where it ran. A global profile is about 10% cheaper and can route to any commercial Region; block it with a service control policy on the bedrock:InferenceProfileArn condition where residency matters.

On Google Cloud, regional or jurisdictional endpoints (us, eu) keep machine learning processing in that jurisdiction; the eu multi-region excludes the UK and Switzerland, and the global endpoint carries no residency guarantee. Gemini caches data for up to 24 hours by default, which can be disabled, and Grounding with Google Search stores queries for up to three days with no opt-out.

Microsoft 365 Copilot is an EU Data Boundary service for EU customers, with two exceptions to plan around: models provided by Anthropic as a subprocessor are excluded from the boundary, and Multi-Geo tenants fall outside its scope. Copilot Cowork has its own at-rest commitment for 15 countries and regions.

What do vendors keep, and what must you be able to delete?

It depends on the store. Model vendors publish retention modes, Microsoft keeps Copilot prompts in user mailboxes under Purview retention, and your own logs, traces and memory stores keep whatever you configure. Set a retention period for each store, make one person's records findable, and write both into the data protection impact assessment.

Amazon Bedrock now has explicit data retention modes (none, default, aws_review and the legacy provider_data_share) that a service control policy can enforce. In aws_review, AWS may keep prompts and completions for up to 30 days and have people review them without sharing content with the model provider; some newer models require that mode, and with cross-Region inference the retained data sits in the destination Region. Model providers have no access to the accounts where Bedrock runs their models, or to its logs, prompts or completions.

Microsoft stores Copilot and AI app prompts and responses in hidden folders in each user's Exchange mailbox, under Purview retention locations for Microsoft Copilot experiences, enterprise AI apps and other AI apps. eDiscovery can search and purge them, ten items per mailbox per run and only after holds are removed, and a delete-after-one-day policy can take about 16 days to purge fully. Deleting a Copilot conversation does not delete the Copilot memory tied to it; the memory privacy and retention page of this guide covers agent memory in depth.

Your own stores need the same treatment. The EU AI Act asks providers and deployers of high-risk systems to keep automatically generated logs for at least six months unless Union or national law, in particular data protection law, says otherwise; the Commission's AI Act page puts those duties at 2 Dec 2027 for Annex III uses. Pseudonymize identities in traces where you can: AWS recommends pairwise subject identifiers to keep personal data out of AgentCore Gateway entries in CloudTrail.

How do Microsoft, AWS and Google implement it?

Residency, vendor retention and risky-use detection on each cloud, as the vendor pages showed on 2 Nov 2026.

Capability, Microsoft, AWS, Google

CapabilityMicrosoftAWSGoogle
Keep processing in a regionEU Data Boundary for Microsoft 365 Copilot, excluding Anthropic models and Multi-Geo tenantsGeographic cross-Region inference profiles; SCP on bedrock:InferenceProfileArnRegional or jurisdictional endpoints instead of global
What the vendor keepsPrompts, responses and Graph data not used to train foundation models; Copilot opted out of Azure OpenAI abuse-monitoring human reviewRetention modes none, default and aws_review (up to 30 days)Cache of up to 24 hours by default; Search grounding queries kept up to three days
Detect risky useInsider Risk Management Risky AI usage template; Risky Agents template (preview)Amazon Macie for sensitive data in S3 knowledge sourcesModel Armor with Sensitive Data Protection inspection

In-country processing commitments for Microsoft 365 Copilot could not be confirmed on Microsoft pages for this review, so this page states only the at-rest and EU Data Boundary positions.

Frequently asked questions

Do Microsoft, AWS and Google train models on our agent prompts?

Their documentation for these enterprise services says no. Microsoft says prompts, responses and data accessed through Microsoft Graph are excluded from training its foundation models; AWS says model providers have no access to Bedrock prompts or completions; Google says it does not train on customer data without permission. Retention for abuse monitoring or review is a separate question, covered above.

Is a DPIA required for an AI agent?

Often, under GDPR Article 35, when the agent processes personal data at scale or helps make decisions about people, and for high-risk systems the EU AI Act links the deployer's information duties to that assessment in Article 26(9). The EDPB consulted on a DPIA template from 14 Apr to 9 Jun 2026. Include the agent's memory, logs and traces alongside its prompts.

Are embeddings and memory summaries anonymous data?

Usually not, and treating them as anonymous without testing leaves GDPR fully in scope. The EDPB's draft anonymisation guidelines of 8 Jul 2026 set three criteria: no singling out of records, no linkage and no inference. Its Opinion 28/2024 says identifying people from a model, or extracting their data, must be very unlikely before a model counts as anonymous.

Which data protection check should come first before an agent goes live?

An oversharing check on the sources the agent will search, with the worst sites fixed first. An agent that searches for a user returns what that user can already reach, so a stale link shared with everyone on a finance site becomes an answer in a chat. Restricted Content Discovery can hide a site from Copilot while its permissions are cleaned up.

More in Security threats to agents

Sources

Each source was read on 2 November 2026. The date shown is the date on the page, or the page’s ms.date for Microsoft Learn; an undated page shows the date it was read.

  1. Data Security Posture Management for AI (classic) Microsoft Learn, 15 December 2025
  2. Restricted Content Discovery Microsoft Learn, 11 October 2026
  3. Microsoft Purview considerations for Microsoft 365 Copilot Microsoft Learn, 30 June 2026
  4. Learn about the Microsoft 365 Copilot DLP policy location Microsoft Learn, 16 October 2026
  5. Microsoft Purview for Microsoft Foundry Microsoft Learn, 1 May 2026
  6. Retention policies for Copilot and AI apps Microsoft Learn, 25 June 2026
  7. Search and delete Copilot and AI app data with eDiscovery Microsoft Learn, 19 June 2026
  8. Insider Risk Management policy templates Microsoft Learn, 5 May 2026
  9. Data, privacy and security for Microsoft 365 Copilot Microsoft Learn, 9 July 2026
  10. Data residency for Microsoft 365 Copilot Microsoft Learn, 8 October 2026
  11. What is the EU Data Boundary? Microsoft Learn, 21 July 2026
  12. Real-time protection for AI agents Microsoft Learn, 1 July 2026
  13. Data protection in Amazon Bedrock AWS documentation, undated page, read 2 November 2026
  14. Data retention in Amazon Bedrock AWS documentation, undated page, read 2 November 2026
  15. Cross-Region inference AWS documentation, undated page, read 2 November 2026
  16. Sensitive information filters (Bedrock Guardrails) AWS documentation, undated page, read 2 November 2026
  17. AgentCore release notes AWS documentation, undated page, read 2 November 2026
  18. AgentCore Gateway inbound authorization AWS documentation, undated page, read 2 November 2026
  19. Data residency for generative AI Google Cloud, undated page, read 2 November 2026
  20. Data governance for generative AI Google Cloud, undated page, read 2 November 2026
  21. Model Armor overview Google Cloud, undated page, read 2 November 2026
  22. Model Armor release notes Google Cloud, undated page, read 2 November 2026
  23. Regulatory framework for AI (AI Act) European Commission, 19 October 2026
  24. Article 19: Automatically generated logs artificialintelligenceact.eu, undated page, read 2 November 2026. Secondary transcription of the Regulation; check EUR-Lex for the authoritative text.
  25. Guidelines, recommendations and best practices (consultations) European Data Protection Board, undated page, read 2 November 2026
  26. EDPB sheds light on anonymisation and web scraping for generative AI European Data Protection Board, 8 July 2026
  27. EDPB opinion on AI models: GDPR principles support responsible AI European Data Protection Board, 18 December 2024

Planning an AI program?

Talk to the team that builds it and runs it after launch.

  • Built to SOC 2, HIPAA and GDPR standards
  • EU AI Act-aligned delivery
  • Microsoft Solutions Partner