Skip to content
data.co

Wiring SharePoint Into Private AI Without Breaking Permissions

How to connect SharePoint and Microsoft Graph to a private RAG stack while preserving site, library, and item-level ACLs across every AI query.

November 14, 2026 · Timothy Carter
Illustration of a layered vault with sorted document channels passing through separate keyed gates.

Sensitive Information Disclosure jumped from sixth to second in the 2025 OWASP Top 10 for LLM Applications. For a team pointing a private AI at a SharePoint tenant, that risk sets the ceiling on every other control the architecture tries to add.

Permission decisions have to move out of the prompt and into the retriever. The practical work is to scope Graph app permissions correctly, pull ACLs alongside content, sync changes incrementally, trim at query time, and sign each retrieval into audit.

Permissions Travel With the Document, Not the Prompt

A system prompt that says "only answer if the user is authorized" is not an access control. It is a suggestion to the model, bypassed by any sufficiently motivated query. Access control cannot live in the prompt because the model has no way to verify identity and no way to reason about effective permissions on a document.

Microsoft Graph gives you the primitives to enforce access outside the model. Sites.Selected restricts an application to specific site collections rather than the entire tenant, with permissions granted through explicit API calls to /sites/{siteId}/permissions. Enabling it is a three-step process: consent in Entra ID, a resource-level grant posted to the permissions endpoint, and token acquisition. Missing any step blocks access. That is the correct shape for a private-AI ingestion identity. Specific sites. Explicit grants. No accidental read on the HR library.

Audit the Tenant Before You Index It

Oversharing in SharePoint is not an edge case. The common patterns repeat across tenants: "Everyone except external users" groups layered on top of inherited libraries, broken permission inheritance in sub-sites, legacy "All Employees" groups, and anonymous sharing links generated years ago and never revoked.

Common SharePoint Oversharing Patterns Found in Enterprise Tenants
PatternTenant prevalenceWhy it hurts private-AI retrieval
'Everyone except external users' groups80%Dumps every internal user into a default readership
Anonymous or org-wide sharing links70%Links usable by anyone who holds the URL
Broken permission inheritance65%Sub-sites and libraries unexpectedly open
Legacy 'All Employees' security groups55%Stale, undifferentiated read access at scale
Prevalence of four specific oversharing patterns across EPC Group's 700+ tenant security reviews. Source: EPC Group, 2026

Fixing these before ingestion is cheaper than trimming them at retrieval. A real audit pass removes broken inheritance, retires org-wide groups where it can, and tags the sites that will be in scope for AI. The point of running AI on your own infrastructure is defeated if the corpus it indexes still carries a decade of sharing-by-default decisions.

Rows of filing cabinets with color-coded drawer tags representing different reader groups.

Extract ACLs With the Content, Not After

At index time, every chunk needs an ACL fingerprint written alongside the vector. Store the set of Entra ID group object IDs and user object IDs that grant read, not display names, since display names rename. Capture both explicit grants and inherited ones, and record the site, library, and item scopes that produced the grant. This is table stakes for protecting proprietary data while still letting the retriever use it.

An ACL fingerprint carried on the chunk has a secondary benefit. A post-hoc audit can replay any retrieval and check whether the requester was in the allowed set at the moment the chunk was returned. That becomes evidence rather than a claim.

Keep ACLs Fresh With Incremental Delta Sync

Full re-crawls of a SharePoint tenant are slow and throttled. Graph's delta query returns only what has changed since the last token, and change notifications fire webhooks on specific sites. The engineering reality is that content changes and permission changes travel on different subscription cadences.

Graph Change Notification Windows the Sync Must Keep Alive
Graph Change Notification Windows the Sync Must Keep AliveMost Graph resource webhooks: 0d; SharePoint / OneDrive driveItems: 0d0d8d15d23d30dMost Graph resource w…0d–3dSharePoint / OneDrive…0d–30d
Most Microsoft Graph webhook subscriptions expire at three days; SharePoint and OneDrive driveItem subscriptions can last up to about 30. The two renewal cadences run in parallel through any rollout. Source: Andrew Connell, 2025

Treat permissions as a first-class change stream. When an admin removes a user from a library, the content has not changed, but the chunk's ACL fingerprint has to be rewritten. Missed ACL events are the long tail of RAG leakage: someone leaves a project but the retriever keeps serving them its documents until the next full crawl.

Trim at Query Time, Not Just at Index Time

Even with clean ACL fingerprints on every chunk, you enforce them again at query time, with the reader's identity resolved to the same object IDs the fingerprint uses. The retriever does vector search on the subset the reader is allowed to see, not on the whole index. Query-time trimming is what keeps a Copilot alternative from surfacing what it technically could.

OWASP Top 10 for LLM Applications: Previous Rank vs 2025 Rank
OWASP Top 10 for LLM Applications: Previous Rank vs 2025 RankPrompt Injection: 1; Sensitive Information Disclosure: 6; Supply Chain: 5; Data and Model Poisoning: 3; Improper Output Handling: 2; Excessive Agency: 8; Unbounded Consumption: 4Previous rank2025 rankPrompt Injection11Sensitive InformationDisclosure62Supply Chain53Data and ModelPoisoning34Improper OutputHandling25Excessive Agency86Unbounded Consumption410
Lower is worse. Sensitive Information Disclosure made the sharpest climb on the list, which is the risk a SharePoint-connected private AI sits most directly on top of. Source: Giskard, 2025

A Gartner survey of IT leaders found 40% delayed Microsoft 365 Copilot rollouts by three months or more because of oversharing concerns. Teams running Data.co Control on their own SharePoint tenants handle this the same way an internal application would. Resolve the caller's groups, intersect with the chunk's allowed set, refuse the retrieval if the intersection is empty.

Sign Every Retrieval Into the Audit Log

Every retrieval is a decision. This identity asked this question. These chunks were in the candidate set. This chunk's ACL fingerprint matched the reader's groups. All of that lands in a signed, append-only log that outlives both the model and the session.

NIST AI 600-1 Risks Grouped by Where They Originate
NIST AI 600-1 Risks Grouped by Where They OriginateTechnical and Model: 4 risks; Misuse by Humans: 5 risks; Ecosystem and Societal: 2 risks; Cross-Cutting (Data Privacy): 1 risks0 risks2.5 risks5 risks4 risksTechnical a…5 risksMisuse by H…2 risksEcosystem a…1 risksCross-Cutti…
NIST's twelve generative-AI risk categories distribute across three origin groups plus a cross-cutting Data Privacy risk. Read as the volume of risk surface per origin group; data privacy sits across all of them. Source: WitnessAI, 2024

A signed audit log is the artifact a security team hands to internal audit or a regulator. It also closes the loop on remediation. Queries that keep pulling from the same suspected-overshared sites are easier to spot in aggregate than in a review of individual libraries. The audit log is where oversharing patterns become measurable instead of anecdotal.

Where These Deployments Break

Three failures recur. First, the ingestion app runs under a broad Sites.Read.All consent because Sites.Selected took too long to wire, and the private AI quietly inherits tenant-wide reach. Second, ACL fingerprints capture a snapshot and stop updating when a user's group memberships change, so an ex-employee's old project chunks stay matchable for weeks. Third, the audit log is written to the application database rather than an append-only store, so a retrieval is reconstructable only until the next schema migration.

Each of these is fixable without rebuilding the pipeline. Each of them, left in place, undoes most of the access control the architecture claims to provide.

Match the Move to Your Rollout Stage

If you are at the proof-of-concept stage, pause ingestion and run a tenant oversharing audit first. The four patterns above are the ones to look for, and fixing them before indexing is cheaper than remediating a leaked chunk after the fact.

If you are mid-rollout and already indexing, verify the ACL fingerprint is on every chunk and that query-time trimming is active for every retrieval path, not only the primary one. Add a permission-change event stream to the delta sync if you have not already. The leak happens in the path nobody tested.

If you are evaluating platforms to replace Copilot on your own tenant, require three things in the demo: Sites.Selected scoping on the ingestion identity, incremental delta sync for both content and permission changes, and signed audit records tying each retrieval to the Entra ID object IDs that authorized it. A vendor that cannot show those on request is selling something closer to a hosted model service than to private infrastructure.

Timothy Carter
Chief Revenue Officer

Timothy Carter is Chief Revenue Officer and has spent over two decades in SEO and digital marketing. At Data.co his focus is the buyer's side of private AI: what a security or data team needs to see before an AI project leaves the pilot stage, and why the hardest question is usually not which model to run but which data it is allowed to touch. He has written for Forbes, Entrepreneur, Marketing Land, Search Engine Journal and ReadWrite, and tends to start from what the buyer already knows is broken rather than from the feature list.