# Do SharePoint Permissions Carry Over to RAG? Access Control in Vector Search

SharePoint document library permissions do not carry over to vector embeddings during standard RAG ingestion. When chunking text into vector stores, native access control lists get stripped, meaning retrieval security depends on pre-filtering metadata or containerized workspace boundaries. Understanding how access controls fail in vector search helps engineering teams prevent sensitive corporate data leaks.

Source: https://fast.io/resources/do-sharepoint-permissions-carry-over-to-rag/
Author: [Derek Labian](https://fast.io/authors/derek-labian/)
Last reviewed: 2026-11-10

## Do SharePoint Permissions Carry Over to RAG? Why Vector Databases Strip ACLs

In an enterprise RAG deployment, connecting a vector database to a SharePoint document library creates an immediate security hole: similarity search does not understand SharePoint permission inheritance, site collection roles, or item-level access control lists. When an engineering team indexes corporate documents into a vector store, mathematical representations of text replace native security descriptors. Without an explicit access boundary, an AI assistant or retrieval agent surfaces confidential payroll records, acquisition briefings, or internal legal disputes to any employee who asks a semantically related question.

Do SharePoint permissions carry over to RAG retrieval? Not unless the pipeline copies them. In custom RAG pipelines, SharePoint document library permissions do not carry over to vector embeddings on their own, so retrieval security depends on enforcing workspace boundaries or query-time ACL filters at the container layer. Some Microsoft products do carry them: Microsoft 365 Copilot only surfaces data a user can at least view, and the Azure AI Search SharePoint indexer can ingest permission metadata (in preview). When an ETL pipeline extracts text from SharePoint and generates vector embeddings, it strips the underlying access control lists (ACLs). Standard vector databases evaluate semantic similarity based on mathematical cosine distance, remaining completely unaware of Microsoft Entra ID groups, inheritance rules, or file-level sharing permissions.

Understanding why this breakdown occurs requires examining how documents become vectors. In a standard pipeline, a crawler reads files from SharePoint document libraries, parses their text, splits that text into discrete chunks of several hundred tokens, and passes those chunks through an embedding model. The embedding model outputs high-dimensional numeric arrays that capture semantic meaning. When an end user asks a question, the retrieval engine converts the question into a query vector and executes an approximate nearest neighbor search across the vector store.

The mathematical operations governing vector search have no built-in concept of user identity, security identifiers, or permissions. To the index, an embedded paragraph from an executive bonus memo looks identical in structure to an embedded paragraph from an IT helpdesk guide. If the user prompt closely aligns with the concepts in the bonus memo, the vector database returns that chunk among its top results. The retrieval layer assumes that if a record exists in the vector index, the querying system is authorized to read it. Unless engineers deliberately construct an authorization gate, the downstream language model consumes the sensitive chunk and incorporates it into its final response.

### The Anatomy of SharePoint Access Control Lists

SharePoint permissions represent one of the most sophisticated authorization systems in enterprise software, which makes their absence in vector search especially jarring. Within an enterprise Microsoft cloud tenant, access control is hierarchical yet flexible. Permissions typically cascade down an inheritance tree:

1. **Site Collection Level:** Governed by site owners, members, and visitors, frequently tied to Microsoft security groups.
2. **Document Library Level:** Libraries inherit site permissions by default but can break inheritance to establish custom access boundaries.
3. **Folder Level:** Folders inside libraries can inherit parent settings or carry unique permissions granted to specific teams.
4. **Item Level:** Individual documents, spreadsheets, or presentations can break inheritance entirely, restricting access to named users or specific security groups.
5. **Direct Sharing Links:** Users can create scoped links, such as view-only links for specific external collaborators or company-wide read links.

This multi-tiered system relies on Microsoft Entra ID to evaluate user tokens against security principals at runtime. When an employee browses SharePoint directly, the storage engine validates every folder and file request against the caller active token. If an employee lacks the necessary read claim, SharePoint conceals the file completely. In vector search, this dynamic evaluation layer disappears unless you explicitly rebuild it.

### The Vector Search Disconnect

When text chunks enter a vector database, the rich contextual metadata of SharePoint is discarded. Vector databases such as Pinecone, Qdrant, Milvus, and pgvector are purpose-built for geometric similarity calculation, not relationship-based access control.

Consider a real-world failure mode. An enterprise human resources department stores annual salary reviews in a dedicated folder inside an internal SharePoint document library. An engineer builds an internal knowledge assistant to help employees search company policies, pointing a generic ingestion connector at the entire SharePoint site collection.

During ingestion, the connector extracts text from every document, breaks the files into chunks, and populates the vector index. When a curious employee enters the prompt, "What are the standard compensation bands and bonus multipliers for senior managers?", the vector database does not evaluate whether the caller belongs to the Human Resources security group. Instead, it measures the cosine similarity between the query embedding and every chunk in the database.

Because the executive compensation files contain exact semantic matches for bonus structures and compensation bands, those confidential chunks rank highest in similarity. The retrieval engine pulls them into the context window, and the language model outputs the exact figures to the employee. The security failure did not happen because the language model was tricked; it happened because the retrieval layer handed over unauthorized data before generation ever began.

## How Query-Time Pre-Filtering Compares to Post-Filtering in Vector Search

When engineering teams discover that vector databases do not respect SharePoint permissions, they generally turn to one of two technical architectures: post-filtering or pre-filtering. While both attempt to reconcile user identity with vector search, their performance, operational reliability, and security profiles differ dramatically.

Understanding the boundary where authorization takes place is critical for enterprise security architects. Relying on the language model to enforce access control through system prompt instructions is never an option. Prompt instructions such as "Only answer with information the user is allowed to see" are easily bypassed through prompt injection or indirect context extraction. Security must be enforced deterministically at the retrieval layer before text enters the prompt context window. The technical debate centers on whether to filter candidate chunks before similarity ranking takes place or after candidate chunks have already been fetched by a background service account.

### The Post-Filtering Anti-Pattern and Recall Collapse

Post-filtering is the most common anti-pattern in early enterprise RAG implementations. In a post-filtering architecture, the application queries the vector database using a high-privilege service account that can see all records. The vector database returns the top semantically relevant chunks across the entire corpus. An authorization layer in the application then inspects each retrieved chunk, checks the caller identity against the source document access list, and discards any chunk the user is not permitted to view.

While post-filtering appears simple to implement, it suffers from a fatal flaw known as recall collapse:

* **Complete Retrieval Failure:** Suppose an employee asks a question, and the vector search engine retrieves the top ten most relevant chunks. If all ten chunks originate from restricted files that the employee cannot read, the post-filter discards all ten. The application then passes an empty context window to the language model, which responds that it cannot find an answer. Yet, highly relevant, public documents answering the question may have been located slightly lower in the rankings.
* **Latency Spikes from Over-Fetching:** To mitigate recall collapse, systems attempt speculative over-fetching, requesting fifty or one hundred chunks instead of ten. Sorting, filtering, and verifying permissions across large candidate batches introduces noticeable latency to every chat interaction.
* **Side-Channel Information Leakage:** Even if unauthorized text is stripped from the prompt, the presence of filtered chunks can leak information through application logs, latency timing variations, or metadata telemetry. If an assistant takes twice as long to answer when querying topics related to an unannounced corporate acquisition, attackers can infer the existence of confidential files.

Because of these vulnerabilities, post-filtering is widely rejected in production environments that handle sensitive corporate data.

### Pre-Filtering Mechanics and Metadata Ingestion

The standard technical alternative to post-filtering is pre-filtering, commonly referred to as security trimming. In a pre-filtering architecture, document permissions are converted into metadata fields stored alongside each vector chunk during ingestion. When a user executes a search, the application passes their authenticated security credentials into the query filter, instructing the vector database to exclude unauthorized records before calculating similarity scores.

Implementing pre-filtering requires structuring the vector metadata schema to store security principals:

```json
{
  "id": "doc_hr_4921_chunk_03",
  "vector": [0.0142, -0.0521, 0.0891, 0.0315],
  "text": "Senior management bonuses require dual sign-off from division heads...",
  "metadata": {
    "source_file": "compensation_guide.docx",
    "sharepoint_site": "Corporate-HR",
    "allowed_users": ["user_guid_alpha", "user_guid_beta"],
    "allowed_groups": ["group_guid_hr_admins", "group_guid_executives"]
  }
}
```

When a user submits a query, the application extracts their unique user identifier and their active security group memberships from their Microsoft Entra ID token. The search query combines semantic similarity with an exact boolean filter:

```text
filter: (allowed_users contains "current_user_id") OR (allowed_groups intersects current_user_groups)
```

The vector engine applies this filter to prune the index down to authorized records before ranking nearest neighbors. This keeps the returned top chunks both semantically relevant and authorized for the asking user, as long as the metadata is current. However, while pre-filtering solves the recall collapse problem, maintaining these metadata arrays introduces severe engineering bottlenecks.

## Why Graph API Token Middleware Adds Enterprise Complexity

Many architectural guides for enterprise search recommend building custom token passthrough middleware using the Microsoft Graph API. Under this model, an application intercepts the user prompt, exchanges their session token for a scoped Graph API token, evaluates their group memberships, and dynamically constructs OData security filters for vector queries.

While this pattern works in small proof-of-concept environments, running dynamic token passthrough against large SharePoint tenants introduces significant operational complexity:

* **Permission Staleness and Synchronization Lag:** In active organizations, permissions change continuously. Team members join or leave departments, files move between folders, and document owners share links with external consultants. In a custom vector database, permissions stamped onto chunks during ingestion are static snapshots. If an employee leaves the finance department on Monday, they retain access to finance embeddings until the ingestion worker re-crawls and updates every chunk. Building real-time synchronization requires subscribing to Microsoft Graph change notifications, which can drop events under load and create dangerous security windows.
* **Transitive Group Expansion Limits:** In enterprise Active Directory and Entra ID environments, security groups are deeply nested. A user might belong directly to five groups, but those groups belong to parent groups, department lists, and organizational units, expanding to hundreds of effective security principals. Injecting hundreds of group identifiers into an OData filter or vector metadata query rapidly exceeds query string length limits, inflates payload sizes, and degrades search performance.
* **Broken Inheritance Traversal Overhead:** When SharePoint document libraries contain thousands of folders and files with broken inheritance, indexing permissions becomes computationally expensive. The crawler cannot simply inherit the site security descriptor; it must query the Graph API permissions endpoint for every individual item. In a tenant with hundreds of thousands of files, initial indexing can take a long time, and repeated polling quickly triggers Microsoft Graph API rate limits and HTTP throttling errors.
* **Service Account Privilege Creep:** To crawl and index files across multiple SharePoint libraries, backend pipelines require elevated application permissions such as full site read access. This creates a high-privilege service principal with broad read access across the entire tenant. If that service principal is compromised, attackers gain access to all corporate data, completely bypassing internal compartmentalization.

The table below contrasts the primary architectural approaches for handling SharePoint permissions in AI retrieval systems:

| Architectural Approach | Access Security | Ingestion Complexity | Permission Sync Latency | Query Latency | Primary Failure Mode |
|---|---|---|---|---|---|
| **Direct Vector Search** | None (Public) | Low (Raw chunking) | Instant (No ACLs tracked) | Lowest | Severe data leakage of restricted files |
| **Post-Filtering** | High (Strict trimming) | Low (Raw chunking) | Instant (Evaluated at runtime) | High | Recall collapse and empty answers |
| **Graph API Pre-Filtering** | High (If synced) | High (Token middleware) | Delayed until re-sync (Stale ACL risk) | Medium | Rate limiting and group payload limits |
| **Containerized Workspaces** | Strong (Container boundary) | Low (Container mapping) | None (source ACLs not synced) | Low | Misconfigured container membership |

The maintenance overhead of managing millions of fine-grained metadata tags across a flat vector database has led many infrastructure teams to seek a more durable abstraction.

## How Containerized Workspaces Enforce RAG Retrieval Boundaries

Instead of dumping an entire corporate tenant into a single monolithic vector index and attempting to filter millions of individual chunks on every query, containerized workspaces solve RAG permissions by aligning retrieval boundaries with storage containers.

In a containerized workspace architecture, documents are segregated into sovereign project, team, or department workspaces. Retrieval boundaries follow container membership rather than dynamic, item-level metadata filters. If an AI assistant operates on behalf of the legal department, it queries a workspace populated exclusively with legal files. Its searches do not reach human resources or engineering workspaces it is not a member of.

[Fast.io](https://fast.io) provides this containerized architecture out of the box for agentic teams through [intelligent workspaces](/product/workspaces/). Permissions are set per organization, workspace, and share, strictly by member role:

* **Role-Based Membership:** Workspace roles include owner, admin, member, guest, and view. Organization roles include owner, admin, and member. Every workspace member accesses the workspace contents according to their assigned role.
* **No Folder or File Permission Sprawl:** There are no folder-level or file-level permissions inside a Fast.io workspace. By eliminating nested permission inheritance, the system eliminates the primary cause of permission drift and indexing corruption. To give someone access to only certain files or one folder, teams place those files in a dedicated share or a separate workspace.
* **Sovereign Intelligence Boundaries:** Fast.io Intelligence Mode auto-indexes workspace files for semantic search, summarization, and interactive chat. Search and Intelligence answer only from the workspaces and shares the asking person or agent belongs to. A share's AI answers exclusively from that share's files.

This model shifts the security boundary from fragile, item-level metadata tags to predictable container membership. There is no custom token middleware to maintain, no group expansion limits to manage, and retrieval does not cross into workspaces the asker is not a member of.

### Connecting SharePoint Libraries via Cloud Sync

Organizations do not need to abandon SharePoint to benefit from containerized AI retrieval. [Fast.io Cloud Sync](/product/cloud-sync/) connects Google Drive, Dropbox, Box, and OneDrive (reaching SharePoint document libraries through the OneDrive connector) to a workspace, one-way or two-way, on a recurring schedule or on demand. Cloud Sync never runs continuous, live, or real-time sync, ensuring predictable batch updates.

Crucially, when SharePoint files sync into a Fast.io workspace, the source system sharing settings and access control lists do not carry over. The synced files immediately take the Fast.io workspace permissions.

This permission reset is a massive architectural advantage for AI deployments. In typical corporate environments, SharePoint permissions suffer from years of permission rot, including abandoned sharing links, orphan user accounts, and broken inheritance rules that no administrator fully understands. By syncing targeted SharePoint document libraries into isolated Fast.io workspaces, teams cleanly sever this legacy debt. What an AI agent or team member can retrieve is decided entirely by Fast.io workspace membership, creating a verified, clean retrieval boundary.

### Scoped Agent Access and Remote MCP Configuration

AI agents and human team members collaborate inside the same Fast.io workspaces using identical context boundaries. Autonomous agents connect to Fast.io workspaces through the official remote Model Context Protocol (MCP) server over Streamable HTTP:

* **Claude Applications and General MCP Clients:** Connect to `https://mcp.fast.io/mcp/tools`.
* **Coding Agents (Cursor, Claude Code, Cline, Devin):** Connect to `https://mcp.fast.io/mcp/code`.
* **ChatGPT and Codex Custom Servers:** Connect to `https://mcp.fast.io/mcp/operations` (or install the Fastio plugin directly from the plugin directory).

For interactive clients, users sign in via browser-based OAuth and, on the Review Permissions screen, select Read Only or Read & Write and choosing exactly which organizations and workspaces the connection reaches. For headless server processes and autonomous agents using [workspace storage for agents](/storage-for-agents/), connections use a scoped API key passed via an `Authorization: Bearer <api key>` header. Detailed connection steps are available in the [Fast.io MCP documentation](https://mcp.fast.io/docs) and the [agent guide](https://mcp.fast.io/skill.md). API keys carry explicit scopes and act with the exact permissions of the user who created them. With a Read Only connection, tools that modify or delete data are not offered at all, preventing accidental file alterations.

Inside the workspace, agents can read and write files, inspect per-file version history, and query documents with citations back to exact source passages. Teams can also use Collaborative Notes, which live in the workspace alongside files and are indexed for AI grounding. Notes support live co-editing with visible, labeled cursors for people and agents alike. When structured extraction is needed, [Metadata Views](/product/document-data-extraction/) turn unstructured documents into typed data grids without OCR templates, giving agents structured data alongside semantic vector search.

## Checklist for Deploying Permission-Aware RAG in Enterprise Workspaces

Transitioning from unverified SharePoint vector indexing to a containerized retrieval architecture requires deliberate planning. Engineering teams and IT leads should execute the following implementation sequence to keep permission boundaries strict across AI workflows:

### 1. Audit Corporate Repositories and Define Information Domains
Before connecting any ingestion pipeline, identify confidential and high-risk data repositories. Categorize SharePoint document libraries by confidentiality tier: general operations, engineering documentation, executive communications, finance, and human resources. Avoid indexing broad site collections into a single knowledge base.

### 2. Provision Containerized Workspaces with Explicit Join Policies
Create dedicated Fast.io workspaces corresponding to each information domain. When creating a workspace, review its access settings immediately. A Fast.io workspace defaults to letting any member of its parent organization join; to keep sensitive workspaces restricted to named people and agents, administrators must explicitly restrict this setting. Assign workspace roles (owner, admin, member, guest, or view) based on least privilege. Review subscription details on [Fast.io pricing](/pricing/) to allocate appropriate workspace counts and monthly credit allowances.

### 3. Establish Scheduled Cloud Sync from Target SharePoint Libraries
Connect your SharePoint document libraries through the OneDrive connector using Cloud Sync. Configure sync to run on a predictable schedule or on demand. Because Cloud Sync runs one-way or two-way without continuous real-time background execution, administrators maintain full control over when new source documents enter the workspace and undergo AI indexing.

### 4. Provision Scoped Credentials for Agent Integration
When integrating AI assistants, never use unrestricted administrative tokens. For headless pipelines, generate scoped API keys restricted to the specific workspaces the agent requires. Connect agents using the appropriate remote MCP endpoint, such as `https://mcp.fast.io/mcp/tools` or `https://mcp.fast.io/mcp/code`. Consult the setup documentation at `https://mcp.fast.io/docs` for client-specific connection flows.

### 5. Monitor Changes Using the Detailed Activity Log
Fast.io maintains a detailed activity log of changes across the organization. The log tracks storage modifications (uploads, edits, moves, and deletions) along with administrative events (membership updates, role changes, and share creation). Note that the activity log records state changes rather than read or download events. It provides an auditable record of who modified files or permissions, ensuring administrative accountability without claiming to track passive viewing history.

### 6. Verify Retrieval Boundaries with Multi-Persona Evaluation
Before opening an AI retrieval service to broad company use, run automated evaluation queries using distinct user and agent personas. Submit prompts seeking confidential financial or executive details from an agent assigned to a general workspace. Confirm that the system returns zero matches, proving that the container boundary successfully blocks unauthorized retrieval without relying on fragile prompt filters.

## Frequently asked questions

### Do SharePoint permissions apply to RAG retrieval?

No. SharePoint permissions do not apply to RAG retrieval by default. When files are parsed, chunked, and converted into mathematical vector embeddings, native access control lists and SharePoint inheritance rules are stripped away. Standard vector databases perform similarity searches based strictly on mathematical distance, meaning any user querying the vector database can retrieve sensitive text chunks unless the pipeline implements query-time pre-filtering or isolates content inside containerized workspaces.

### How does RAG handle SharePoint document libraries?

RAG pipelines handle SharePoint document libraries by crawling files, extracting raw text, dividing content into tokenized chunks, and generating vector embeddings stored in a vector index. Because vector databases do not natively understand Microsoft Entra ID groups or SharePoint sharing links, production architectures must either stamp access control lists onto chunk metadata for query-time security trimming or isolate document libraries into distinct, containerized workspaces where access is governed at the storage boundary.

### Why does vector search bypass SharePoint ACLs?

Vector search bypasses SharePoint ACLs because embeddings are purely mathematical representations of semantic meaning stored as arrays of floating-point numbers. Similarity algorithms like cosine distance evaluate how closely two concepts relate in coordinate space, with zero awareness of user identity, site roles, or file permissions. Unless explicit metadata filters or workspace container boundaries are applied before ranking, vector search evaluates and returns all matching chunks regardless of who created or restricted the source file.

### What is query-time security trimming in vector search?

Query-time security trimming, also known as pre-filtering, is an access control pattern where permitted user and group identifiers are stored as metadata tags alongside each vector chunk during ingestion. When a user submits a query, the application extracts the user's identity and group claims from their authentication token and injects a boolean filter into the search request. The vector database restricts similarity scoring to chunks matching the user's permissions, ensuring unauthorized content is never retrieved.

### Why is post-filtering considered a security anti-pattern in RAG?

Post-filtering is considered an anti-pattern because it retrieves the top semantically relevant chunks across the entire database using a high-privilege service account and discards unauthorized chunks afterward in application code. If all top results originate from restricted files, the user experiences recall collapse, receiving an empty answer even when relevant public documents exist lower in the rankings. Furthermore, post-filtering introduces latency spikes and risks leaking information through side-channel logs.

### What happens to SharePoint sharing settings when files are synced to Fast.io?

When files from SharePoint document libraries are synced into a Fast.io workspace via Cloud Sync, source sharing settings, direct links, and inherited access control lists do not carry over. Synced files automatically take the Fast.io workspace's role-based permissions. This resets legacy permission debt and ensures that what users and AI agents can retrieve is determined strictly by their Fast.io workspace membership.

### How do containerized workspaces eliminate custom token middleware?

Containerized workspaces eliminate custom token middleware by enforcing retrieval boundaries at the storage container level rather than on individual text chunks. Because search and intelligence queries operate strictly within the specific workspaces and shares the asking person or agent belongs to, there is no need to query Microsoft Graph for transitive group expansions, manage complex OData filter strings, or synchronize dynamic item-level access lists.

### Does the Fast.io activity log record when an agent reads or views a file?

No. The Fast.io activity log records state changes, including file uploads, edits, moves, deletions, membership changes, role adjustments, and share creation. It does not record read-only events such as file views, previews, or downloads. The log serves as an administrative audit of what changed in the organization and who changed it, rather than an access or read-tracking log.

## About Fast.io

Fast.io provides shared workspaces where people and AI agents work on the same files, with built-in semantic search and citation-backed chat over what they hold. Agents reach it through a remote MCP server, a REST API at https://api.fast.io/current/, and a command line client published on npm as @vividengine/fastio-cli. MCP setup is at https://mcp.fast.io/docs: Claude and most MCP clients connect to https://mcp.fast.io/mcp/tools, ChatGPT to https://mcp.fast.io/mcp/operations, and coding agents to https://mcp.fast.io/mcp/code.
