Agent Architecture

From the field archive · Learned in 2024

Getting Better Answers From SharePoint in Copilot Studio

What I learned helping customers whose agents gave thin, wrong or missing answers from SharePoint, and what I'd configure today.

Kaustubh Giri··8 min read

Hero image for Getting Better Answers From SharePoint in Copilot Studio

In spring 2024 a utility came to me with a frustrating problem. They had pointed a Copilot Studio bot at a large SharePoint site, and the answers were either generic or missing. Their first instinct was that the AI was the problem. In my experience, it almost never is. Most bad SharePoint answers come down to four things: what content the agent can find, how much of it the agent can read, how narrowly it's scoped, and who is asking.

What's changed since 2024

Copilot Studio agents can now use tenant graph grounding with semantic search (shown as Enhanced search results) when a Microsoft 365 Copilot license exists in the same tenant, which raises the SharePoint file size limit from 7 MB to 200 MB and improves retrieval. SharePoint knowledge sources can be filtered by title, author, modified by and modified date, and URLs can include variables. Graph connectors are now called Microsoft 365 Copilot connectors. Every knowledge source has a description that guides generative orchestration. And agents built on the newer GitHub Copilot harness can use SharePoint column metadata to pick the right documents, something the standard harness still doesn't support at the knowledge source level.

01Why SharePoint answers disappoint

Here's the mental model I use with customers. The SharePoint knowledge source doesn't read your whole site before each answer. It searches, takes the best matching content the user is allowed to see, and summarizes from that. If the search doesn't surface the right document, or surfaces five similar ones, the answer will be weak no matter how good the model is.

That 2024 utility case ended up being mostly about indexing and search behavior, not the bot. I told the team honestly that part of it was outside their control and pulled support in for a deeper review. I also pointed them to a public walkthrough video on the configuration steps, because seeing the setup end to end helped more than another email thread.

02Fix what the agent can find

Search quality starts with content quality. These are the checks I run first.

  • Confirm it's indexed. Search for a unique phrase from the document in SharePoint itself. If SharePoint search can't find it, the agent can't either. Site admins can request a reindex.
  • Use descriptive titles. Microsoft's guidance for the newer harness calls out the document title as a signal for selecting content. "Policy_v3_final.docx" doesn't help anyone.
  • Use modern pages. Classic ASPX page content isn't used for answers, and modern pages with SPFx components aren't supported.
  • Retire duplicates and drafts. Old versions in the same scope compete with current ones.
  • Know the file types. For SharePoint sites, Learn lists Word, PowerPoint and PDF as supported file types.

03Fix what the agent can read

File size limits surprise almost everyone. Without a Microsoft 365 Copilot license in the same tenant, generative answers can only use SharePoint files under 7 MB. With one, and with tenant graph grounding turned on, the limit is 200 MB. Larger files still show up in search but aren't processed.

SetupFile sizeNotes
SharePoint site, no M365 Copilot license in tenant7 MBSplit large files or upload them instead
SharePoint site, tenant graph grounding on200 MBBetter retrieval, possibly slightly more latency
SharePoint files or folders uploaded and synced512 MBIndexed in Dataverse, syncs every four to six hours
Files uploaded directly to the agent512 MBUp to 500 files per agent
Encrypted content

Files protected by sensitivity labels that apply encryption, Double Key Encryption, or a password can show as Ready and still return no answer. That's by design. If a policy document must be encrypted, plan a different path for the agent to answer about it.

04Scope it down

The most common mistake I see is pointing an agent at the root of a big site and hoping. The agent searches the URL you register and its subfolders, never parent or sibling folders. Use that.

Narrow URLs

Point at the library or folder

Register the specific location of authoritative content. With generative orchestration you can add up to 25 SharePoint URLs.

Filters

Advanced settings

Filter a source on Title, Author, Modified by or Modified on, with static values, user input or system variables.

Variables

Dynamic URLs

Insert a variable into the URL so one source can resolve to a different path per user or scenario.

Metadata

Search terms on managed properties

Microsoft's Employee Self-Service guidance shows adding KQL search terms on managed properties, such as country, driven by a user variable.

If you filter, Learn recommends turning off web search and general knowledge so the agent says it has no answer rather than filling the gap from elsewhere. I agree with that for policy content.

The newer GitHub Copilot harness goes further. Microsoft's Copilot Studio team has described agents that discover a library's columns, filter files by values like country or status, then search only those files. That's exactly the "which policy applies to me" problem. Treat it as part of a newer, evolving harness and check current docs for its status before you depend on it.

05Describe sources and set boundaries

Every knowledge source has a name and description, and Learn says a detailed description helps generative orchestration decide when to use it. I write them like a librarian would: what's in it, who it's for, and what isn't in it. "HR policies for US employees, effective current fiscal year. Not benefits enrollment" beats "HR docs."

Restricting what the agent should answer is the other half. In early 2025 a customer asked me how to keep an idea-submission agent from wandering into unrelated topics. Before touching any settings, I sent back a list of clarifying questions. I still use them:

  • What is the agent's primary goal, and what are its key and secondary functions?
  • Which topics are out of scope, and what should it say when asked about them?
  • If a user keeps pushing off-topic questions, should it warn, escalate or log?
  • When should it hand off to a person?
  • Which knowledge sources will it use, and should it show a scope disclaimer at the start?
  • What data must it collect for a submission?

The answers turn into instructions, knowledge descriptions and the general-knowledge setting. My post on environment strategy and DLP covers the governance side of where those agents live.

06Permissions are part of the answer

SharePoint knowledge respects the signed-in user's permissions. A user needs at least read access, and when they don't have it, nothing errors. The agent simply behaves as if the document doesn't exist. That makes permission changes look like agent bugs.

From the field

In 2026 an ITSM software company reported that their HR policy agent suddenly stopped offering one country as an option. No new agent version had been published that night. My first question was whether anything had changed in SharePoint permissions on their side. My second was whether they had opened a support case with conversation IDs from a working and a failing session, so support could trace exactly what the agent retrieved. That's the order I'd follow for any "it worked yesterday" report.

  • Have the affected user open the exact document path directly.
  • Test the same question as the same user in Microsoft 365 Copilot Chat.
  • Check for recent changes to sharing, groups, inheritance or labels.
  • If a site or folder was renamed, update the knowledge source link.
  • Capture conversation IDs before opening a support case.

07Other formats and other sources

From the field

In mid-2026 a customer kept its documentation as Markdown files in SharePoint, and the agent wasn't using them reliably. My recommendation was to convert those files to a supported format, manually or with a flow, or to index them with Azure AI Search and connect that index to the agent. Today, Learn lists .md among supported types for files uploaded directly to an agent, while the SharePoint site source still lists Word, PowerPoint and PDF.

Content lives inWhat I'd use
SharePoint, Office and PDF filesSharePoint knowledge with tenant graph grounding
SharePoint, large Office or PDF filesUpload SharePoint files and folders so they sync to the agent (up to 512 MB each)
Other formats, such as Markdown or JSONUpload files directly to the agent, or convert them
SharePoint listsSharePoint list knowledge (row limits apply)
ServiceNow, Confluence and other external systemsMicrosoft 365 Copilot connectors, configured by your tenant admin
Custom index you already maintainAzure AI Search as a knowledge source

Copilot connectors respect source permissions. If you use manual authentication, add the ExternalItem.Read.All scope.

08Troubleshooting table

SymptomLikely cause and first check
No answer for one user, fine for anotherPermissions. Have the user open the file directly.
No answer for a specific documentNot indexed, too large, encrypted or unsupported type
Answers mix countries or versionsScope too broad. Narrow URLs, filter, or use metadata
Agent picks the wrong sourceVague knowledge descriptions or instructions
Questions about file names or counts failNot supported on the standard SharePoint source
It worked yesterdayRecent permission, rename or publish change. Collect conversation IDs

To monitor quality over time, the governance toolbox covers analytics, Application Insights and test automation.

Where I'd start

Pick the ten questions users ask most. For each one, confirm the right document is indexed, under the size limit, readable by the user and inside a narrow knowledge scope with a clear description. Turn on tenant graph grounding if you have Microsoft 365 Copilot in the tenant. Then test as a real user, not as the maker.

Happy to go deeper on any of this.

— K.G

Sources

  • Microsoft Learn: Add SharePoint as a knowledge source
  • Microsoft Learn: Quotas and limits (Copilot Studio web app and SharePoint limits)
  • Microsoft Learn: SharePoint knowledge sources don't return results in Copilot Studio
  • Microsoft Learn: Upload files as a knowledge source; Unstructured data as a knowledge source
  • Microsoft Learn: Add Copilot connectors as a knowledge source; Knowledge sources summary
  • Microsoft Learn: Use SharePoint advanced filtering for Employee Self-Service agents
  • Microsoft Learn: Available knowledge sources for agents (GitHub Copilot)
  • Microsoft Copilot Studio team blog: SharePoint metadata filtering in Copilot Studio
Kaustubh Giri

Kaustubh Giri · Sr Solution Engineer at Microsoft. 22 years in tech, 18 at Microsoft, helping enterprises build and govern AI agents on Copilot Studio and Power Platform.