AI and search over SharePoint data

Agents, Copilot Studio, text-to-SQL chat and retrieval over SharePoint lists and library metadata, all reading one replicated copy, with what each tool can see set by the database role and row-level security you grant.

Someone in the business has built an assistant over a SharePoint list, and it gives a confident wrong answer to a simple question. Microsoft Learn, checked on 20 October 2026, says Copilot Studio list queries only return data from the first 2,048 rows, so a count or a total over a larger list comes from part of it.

Retrieval jobs that call Graph directly go wrong in a different way. Every question pages through the same lists again, each agent shares the tenant's throttling budget with every other integration, and an embedding index built from a one-off export goes stale the week an item changes.

A replica gives every tool one copy to read. SPSync copies list items and library metadata into a database with a normalised schema, keeps it current with delta reads, and holds the only Graph connection. A text-to-SQL tool gets typed columns and join keys to reason over. An agent connects with a database login, through a Postgres or SQL Server MCP server you already run, or through spsync mcp serve, SPSync's own read-only MCP server over the copy. SPSync ships no agent of its own. For questions about wording, SPSync generates embeddings on each sync for pgvector and Azure AI Search, and re-embeds only the rows that changed.

Some limits shape the design. File contents are not replicated, so an assistant can find a contract by supplier and expiry date and then hand a person the link in SharePoint, but it cannot quote the PDF. SharePoint item permissions are not carried into the copy, which means what an agent may see is set by a read-only role, views and row-level security on the database. There is no path from the copy back to SharePoint, so an agent cannot change a list item. Approved write-back is a design on the roadmap and has not shipped.

If the topic is new to you, read the start-here posts in order. The AI page puts the routes for agents, Copilot Studio and search side by side.

Start here

  1. Why your agent should not query SharePoint live

    Read this before the others, because it settles when a live Graph read is right and when an agent should read a copy.

  2. One SQL copy of SharePoint for every agent you run

    The cost of one cross-list question through Graph, set against one SQL join, shows why a single copy pays off.

  3. Text-to-SQL on SharePoint data depends on the schema

    Once agents read SQL, the schema decides whether their queries come back right, so text-to-SQL follows.

  4. Copilot Studio and SharePoint lists: four routes compared

    Copilot Studio makers can compare list knowledge, a flow, Dataverse and a SQL replica here before building anything.

  5. Keeping a SharePoint vector index current as items change

    Embedding drift shows up months after a vector index goes live, so read this one before you build.

All posts on this topic

Other topics on the blog

Frequently asked questions

What can an agent see, and can it change SharePoint?

It sees whatever its database role is granted, and nothing in SharePoint. SharePoint item permissions are not copied into the replica, so you scope the agent with a read-only role, views and row-level security on the database. There is no write path from the copy to SharePoint, because SPSync never writes to it. Write-back is designed around changes a person approves.

Can the agent read the files in a document library?

It can read a library's columns as rows, including the ones your team added. File contents are not replicated today, so the agent can find a contract by its supplier and expiry date and then hand a person the link in SharePoint.

Where does Azure AI Search fit?

Beside the SQL copy, for questions about wording. SPSync can write the same lists to Azure AI Search or pgvector with embeddings generated on each sync; see retrieval over list data. Keep exact questions, such as counts and joins, on the relational copy.