← Back to insightsMicrosoft 365 Security · 9 min read

Stop employees pasting data into ChatGPT with Microsoft 365

Microsoft 365 gives you three enforcement layers to prevent staff copying sensitive data into public AI tools: Conditional Access to block external AI sites, Defender for Cloud Apps to monitor and restrict uploads, and Purview DLP to detect and stop data leaving approved channels.

27 November 2026By CSharpTek Team
Stop employees pasting data into ChatGPT with Microsoft 365

Microsoft 365 gives you three enforcement layers to prevent staff copying sensitive data into public AI tools: Conditional Access to block external AI sites, Defender for Cloud Apps to monitor and restrict uploads, and Purview DLP to detect and stop data leaving approved channels. Each layer addresses a different point in the workflow—where people work, what they open, and what they copy—so you can choose the right control for your risk appetite. This article shows the exact settings and steps for each.

Why staff paste data into ChatGPT

People use public AI tools because they are fast and already open in a browser tab. Drafting an email, summarising a report or rewriting a paragraph takes seconds in ChatGPT, Claude or Gemini. The intent is not malicious: staff want to finish tasks quickly. They do not always realise that anything pasted into a public AI becomes training data or sits in a vendor's logs outside your control.

Common scenarios include copying client names and revenue figures into a prompt for a summary slide, pasting contract clauses to compare terms, or uploading a spreadsheet of customer contacts for analysis. Each action moves regulated or confidential information beyond your Microsoft 365 tenant and into a third-party service with its own data retention and privacy rules.

Block external AI sites with Conditional Access

Frosted glass gate separating organised paper cards from scattered cards
Conditional Access acts as a gate that separates managed work from uncontrolled external services.

Conditional Access policies in Microsoft Entra ID let you block access to specific web applications by domain. You create a policy that denies sign-in to openai.com, anthropic.com, gemini.google.com and similar domains when users are on corporate devices or networks. This stops people reaching those sites entirely during work hours or from managed endpoints.

Steps to configure a block policy

  • Sign in to the Microsoft Entra admin centre and navigate to Protection > Conditional Access.
  • Create a new policy and assign it to the user groups you want to restrict (for example, all staff except IT).
  • Under Cloud apps or actions, choose Select apps, then add the external AI domains as custom cloud apps using their OAuth client IDs or block by session control if the tool offers sign-in federation.
  • If the AI service does not federate with Entra ID, use Defender for Cloud Apps session policies (covered in the next section) or network-level controls such as firewall rules.
  • Under Access controls > Grant, select Block access.
  • Enable the policy and test with a pilot group before rolling out company-wide.

This approach is blunt but effective for high-risk environments. It prevents any interaction with public AI tools from managed devices. The trade-off is that people may switch to personal phones or home computers, so you need monitoring in the next layer.

Monitor and restrict uploads with Defender for Cloud Apps

Microsoft Defender for Cloud Apps (formerly Cloud App Security) provides visibility into which cloud applications your users visit and what files they upload or download. You connect it to your Microsoft 365 tenant and configure session policies that inspect traffic in real time.

Session policies can warn users when they try to upload a file to an unsanctioned AI service, block the upload entirely, or require admin approval. Defender for Cloud Apps classifies applications by risk score, so you can apply different rules to high-risk generative AI tools versus approved SaaS platforms.

Create a session policy for AI tools

  • In the Defender for Cloud Apps portal, go to Control > Policies and create a new Session policy.
  • Set the policy template to Block upload of potential sensitive files or choose a custom template.
  • Under Activity source, select Activities matching all of the following, then add a filter for App equals the AI service (search the app catalogue for ChatGPT, Claude or the relevant tool).
  • Under Actions, choose Block or Protect to inspect content; Protect applies content inspection in line before allowing or blocking the action.
  • Add a second filter for Activity type equals Upload file or Create item if you want to restrict only file uploads, not browsing.
  • Enable the policy and configure alerts so your IT team sees attempts in near real time.

Defender for Cloud Apps requires a licence for each user (included in Microsoft 365 E5 or as an add-on for E3). The shadow AI discovery capability in Defender for Cloud Apps also shows you which AI tools staff already use, so you can prioritise which domains to block or monitor.

Detect and block sensitive content with Purview DLP

Microsoft Purview Data Loss Prevention (DLP) policies inspect the content of emails, chats, files and even clipboard operations to detect patterns such as credit card numbers, passport details or custom sensitive information types you define (project codes, client names). When a user tries to paste or upload that content to a non-approved destination, Purview can block the action and log the attempt.

Purview DLP works across Microsoft 365 services (Outlook, Teams, OneDrive, SharePoint) and extends to endpoints running Windows or macOS with the Endpoint DLP agent. This means you can stop someone copying a table of customer data from Excel and pasting it into a browser window, even if the browser is open on a personal AI site.

Configure a DLP policy for browser uploads

  • In the Microsoft Purview compliance portal, go to Data loss prevention > Policies and create a new policy.
  • Choose the Custom template and select the locations you want to protect: Devices (for Endpoint DLP) and optionally Exchange, Teams, SharePoint and OneDrive.
  • Under Conditions, add a rule that content contains sensitive information types (choose from the built-in list or create custom classifiers for your data).
  • Under Actions, select Restrict access or encrypt the content in Microsoft 365 locations, and for Devices choose Audit or block activities on devices: specifically Block paste to browsers or Block upload to cloud services.
  • In the browser restriction settings, add the domains of public AI tools (openai.com, claude.ai, etc.) to the blocked list.
  • Set policy tips to notify users why the action is blocked and provide a link to your AI acceptable use policy.
  • Run the policy in test mode with alerts for two weeks to see how many genuine incidents occur, then switch to enforcement.

Purview DLP is the most granular layer because it inspects content rather than just blocking domains. It works even if the AI tool has no OAuth integration or if users access it through a VPN. The AI data loss prevention solution we build combines DLP policies with custom sensitive information types for each client's data taxonomy.

Provide a safe alternative: private AI workspace

Blocking public AI tools without offering an alternative will push staff to bypass controls. Deploy a private AI workspace on Azure that runs the same large language models (GPT-4, Claude, Llama) inside your own tenant. Azure OpenAI Service and Azure AI Studio let you provision models where prompts and responses never leave your subscription and are not used for training.

Users get the speed and capability they need, and you retain full audit logs and data residency. You can connect the private workspace to your SharePoint libraries and internal knowledge bases using retrieval-augmented generation (RAG) so answers are grounded in company documents. This satisfies the productivity demand while keeping sensitive data under your control.

Microsoft 365 Copilot readiness is part of this strategy: once Copilot is deployed, staff have a built-in AI assistant that respects your DLP policies and sensitivity labels, reducing the temptation to use external tools.

Monitor and audit policy effectiveness

After you deploy Conditional Access, Defender for Cloud Apps and Purview DLP, check the alert logs weekly to see which policies trigger most often. High volumes of blocked paste attempts may indicate that staff lack training or that the private AI workspace is not promoted clearly.

  • Review Purview DLP incident reports in the compliance portal under Reports > DLP to see which users and which content types are involved.
  • Check Defender for Cloud Apps activity logs under Investigate > Activity log, filtered by App equals the AI tools you are monitoring.
  • Export Conditional Access sign-in logs from Microsoft Entra ID and filter by Result equals Failure and Application contains the blocked domains to count how many access attempts are stopped.
  • Run a quarterly shadow AI risk assessment to discover new AI services your users adopt and update your block lists accordingly.

Treat these logs as part of your broader AI governance programme. Persistent attempts to bypass controls may point to gaps in the approval process for new tools or inadequate guidance on when to use the private workspace.

Educate users and set clear policies

Technical controls alone will not stop every leak. Publish an AI acceptable use policy that explains which AI tools are approved, what types of data may never leave Microsoft 365, and how to request access to new services. Include examples of risky prompts and safe alternatives.

Run quarterly training sessions that demonstrate the private AI workspace and show how to use sensitivity labels in Outlook and Teams. When people understand both the risk and the approved path, compliance improves and support tickets drop. Make the policy easy to find: link it from your intranet home page and include it in new-hire onboarding.

For regulated industries, map your AI controls to the relevant frameworks (GDPR Article 32 technical measures, ISO 27001 access control clauses, SOC 2 logical access policies). This makes audit preparation simpler and shows external assessors that you have a structured approach to Microsoft 365 security and AI control.

Frequently asked questions

Can I block ChatGPT but allow Microsoft Copilot?

Yes. Microsoft 365 Copilot runs inside your tenant and respects your DLP policies and sensitivity labels, so data never leaves Microsoft's trust boundary. Configure Conditional Access and Defender for Cloud Apps to block external AI domains (openai.com, claude.ai) while leaving microsoft.com and office.com unrestricted. Copilot prompts and responses are logged in the Purview audit log and are not used to train public models.

Will Purview DLP stop someone copying data from Excel and pasting it into Notepad, then into ChatGPT?

Purview Endpoint DLP inspects clipboard operations on managed Windows and macOS devices. If the Excel data matches a sensitive information type in your policy, the initial copy action can be blocked or audited. However, if a user manually retyped the data into Notepad, DLP cannot detect intent; it only inspects structured content patterns. Combining DLP with Conditional Access to block the AI site itself closes this gap.

Do these controls work on personal devices or only corporate laptops?

Conditional Access and Purview Endpoint DLP require the device to be enrolled in Microsoft Intune (corporate-managed). On personal devices, you rely on Defender for Cloud Apps session policies if users sign in via a federated identity, or network-level blocks if they access AI tools through your VPN. For unmanaged personal devices outside your network, technical enforcement is limited; this is where user training and acceptable-use agreements become critical.

How do I find out which AI tools my staff are already using?

Enable Cloud Discovery in Defender for Cloud Apps, which analyses firewall and proxy logs to identify all cloud applications in use. The discovery dashboard highlights generative AI tools by category and risk score. You can also run a shadow AI discovery engagement to review endpoint telemetry and browser history (with user consent) to build a complete inventory before you deploy blocking policies.

What happens if a user tries to upload a file to ChatGPT after I enable DLP?

If your Purview DLP policy is set to Block and the file contains a matching sensitive information type, the upload will be stopped at the browser level and the user will see a policy tip explaining why. The incident is logged in the Purview compliance portal with details of the user, file name, timestamp and matched condition. You can configure the tip to suggest using the approved private AI workspace instead.

Can I apply different rules to different departments (for example, block AI for finance but allow it for marketing)?

Yes. Create separate Conditional Access policies and DLP policies for each user group. Assign the finance team to a strict block policy, and assign marketing to a monitor-only policy that alerts but does not block. Use Entra ID security groups or dynamic groups based on department attributes to manage membership. This approach lets you tailor risk controls to each team's data sensitivity and business needs.

We configure Microsoft 365 DLP, Defender for Cloud Apps and private AI workspaces so your data stays inside your control while staff get the AI tools they need.

Review AI data loss prevention
CCSharpTek TeamAI Engineering Team
Keep exploring

More from Csharptek