---
title: How do you stop AI agents surfacing overshared SharePoint files?
url: https://opencontroller.lyzr.com/blog/stop-ai-agents-surfacing-overshared-sharepoint-files
published: 2026-11-16
updated: 2026-11-16
author: Lyzr
---

# How do you stop AI agents surfacing overshared SharePoint files?

**Fix the permissions, not the agent. Microsoft 365 Copilot and SharePoint agents answer from whatever the signed-in user can already open, so an overshared site becomes an overshared answer. Use SharePoint Advanced Management in order: find exposure with data access governance reports, hide high-risk sites with restricted content discovery, lock them down with restricted access control, then make site owners clean up through site access reviews.**

Agents do not break SharePoint permissions. They expose how loose those permissions already were. A file shared with "Everyone except external users" five years ago was hard to find by browsing. An agent finds it in one prompt.

## Why do agents surface files people should not see?

Copilot and SharePoint agents retrieve content on behalf of the user. They respect existing access. The problem is that existing access is often wrong:

- Sites shared with Everyone except external users (EEEU).
- "Anyone with the link" and organisation-wide sharing links that never expire.
- Broken inheritance on folders nobody remembers creating.
- Inactive sites whose owners have left.

Microsoft's own guidance says SharePoint Advanced Management (SAM) is included with Microsoft 365 Copilot licences, so most Copilot tenants already have the tools below.

## Which SharePoint Advanced Management features matter, and in what order?

| Step | SAM feature | What it does | When to use it |
|---|---|---|---|
| 1. Measure | Data access governance (DAG) reports | Permission state reports, sharing links activity (last 28 days), EEEU insights, sensitivity label snapshot | Before any agent rollout, then monthly |
| 2. Contain | Restricted content discovery (RCD) | Keeps a site's content out of Copilot and agent results; users with access can still open it directly | High-risk sites you cannot fix this week |
| 3. Lock | Restricted access control (RAC) | Limits a site to members of named groups, regardless of item-level sharing | Sites with sensitive content and messy sharing |
| 4. Delegate | Site access reviews | Sends DAG findings to site owners to review and fix | Sites flagged in step 1 |
| 5. Prevent drift | Inactive site policy, site ownership policy, site attestations | Archives or flags stale sites; requires active owners | Ongoing hygiene |
| 6. Watch agents | Agent insights and agent access insights reports | Shows agents created in SharePoint and how agents reach site content | After rollout |

RCD is a containment step. It hides content from AI discovery but does not change permissions. Treat every RCD flag as a ticket to fix the underlying sharing.

## What is the step-by-step rollout?

1. **Run the permission state and EEEU reports.** Sort sites by EEEU grants and by sharing links created in the last 28 days. That gives you a ranked list.
2. **Tag the top sites.** HR, finance, legal, M&A, and board sites first. Anything with a confidential sensitivity label second.
3. **Apply RCD to the top sites you cannot fix quickly.** This buys time without breaking collaboration.
4. **Apply RAC to sites that must never be broadly reachable.** Bind them to a security group the site owner controls.
5. **Start site access reviews.** Owners remove EEEU grants and stale links. Then lift RCD.
6. **Turn on inactive site and ownership policies.** Orphaned sites are where oversharing hides.
7. **Review agent access reports monthly.** New agents appear faster than new sites.

Older guidance also mentions Restricted SharePoint Search, which limits organisation-wide search and Copilot to an allowed list of up to 100 sites. It is a blunt, temporary measure. RCD and RAC are more targeted.

## Do sensitivity labels and Purview help?

Yes, as a second layer. Sensitivity labels with encryption restrict who can open a file. Purview data loss prevention can exclude labelled content from Copilot processing. Data Security Posture Management for AI shows which sensitive files appear in AI interactions. See our guide to [Purview DSPM for AI and agents](/blog/microsoft-purview-dspm-for-ai-and-agents).

Labels only help if files are labelled. Most estates have large unlabelled backlogs. Permission cleanup still comes first.

## What about agents that are not Copilot?

SAM governs SharePoint content and Microsoft's agent experiences. It does not see:

- Third-party agents that call Microsoft Graph with application permissions such as Sites.Read.All.
- Agents on other platforms that sync SharePoint into their own vector stores.
- Coding agents and desktop tools that read files synced through OneDrive.

An agent with a tenant-wide Graph application permission bypasses user-level access entirely. Find those app registrations, check whether they use delegated or application permissions, and prefer Sites.Selected for any agent that needs SharePoint data. Our guide to [governing Microsoft 365 Copilot agents](/blog/govern-microsoft-365-copilot-agents) covers the Copilot side.

## How Opencontroller does this

Opencontroller auto-discovers agents, models and API keys across Azure and the other major clouds and records them in a governed registry with their tools and versions. Posture flags risky permissions and configurations on the agents it finds, such as an agent identity holding broad access. Opencontroller does not replace SharePoint permission cleanup; it shows which agents could reach that content and lets you block or quarantine them through the connected platform. For the wider model, read [what an AI agent control plane is](/blog/what-is-an-ai-agent-control-plane), or [book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Does restricted content discovery remove access to files?**
No. It hides a site's content from Copilot and agent results. Users who already have access can still open files directly.

**Is SharePoint Advanced Management an extra licence for Copilot customers?**
Microsoft states SAM is included with Microsoft 365 Copilot licences. Check your tenant's licence assignments to confirm.

**Can a third-party agent bypass SharePoint permissions?**
Yes, if it uses a Microsoft Graph application permission such as Sites.Read.All. It then reads content without any user's access limits. Use Sites.Selected instead.

## Key facts

Microsoft 365 Copilot and SharePoint agents retrieve only content the signed-in user can access, so oversharing becomes AI exposure. SharePoint Advanced Management (SAM) is included with Microsoft 365 Copilot licences. SAM data access governance reports include permission state reports, sharing links activity (last 28 days), Everyone except external users (EEEU) insights and a sensitivity label snapshot. Restricted content discovery hides a site from Copilot and agent results without changing permissions. Restricted access control limits a site to named groups. Site access reviews delegate fixes to site owners. SAM also has agent insights and agent access insights reports. Third-party agents using Graph application permissions like Sites.Read.All bypass user-level access; Sites.Selected limits them. Opencontroller discovers agents across clouds, records them in a governed registry, and Posture flags risky permissions. Opencontroller pricing starts from $250K per deployment per year.

## Related

- [How do you govern agents in Microsoft 365 Copilot?](https://opencontroller.lyzr.com/blog/govern-microsoft-365-copilot-agents.md)
- [What does Microsoft Purview DSPM for AI cover for AI agents?](https://opencontroller.lyzr.com/blog/microsoft-purview-dspm-for-ai-and-agents.md)
- [How do you audit Copilot Studio agent activity in Microsoft Purview?](https://opencontroller.lyzr.com/blog/audit-copilot-studio-agents-in-purview.md)
- [More on Platform Guides](https://opencontroller.lyzr.com/blog/cluster/platform-guides)
