M365 Copilot Agent built using Agent Builder fails to retrieve/stage knowledge base stored in SharePoint Site or even in the attachments

Rohit Budha Borse 0 Reputation points
2026-09-11T09:49:04.2033333+00:00

We have developed a Microsoft 365 Copilot Agent using Agent Builder and configured a SharePoint-based knowledge repository to support AI-generated training and technical content.

The agent exhibits inconsistent and unreliable behaviour when accessing knowledge sources. While the same prompts occasionally succeed, they frequently fail due to apparent retrieval, indexing, or file access issues.

As a result, the agent is unable to consistently generate grounded responses based on the configured knowledge base.

Knowledge Base Characteristics

  • Approximately 15-20 source documents
  • Each document contains approximately 300-500 pages
  • Documents are stored in SharePoint
  • Documents are configured as knowledge sources for the agent
  • Content consists primarily of large technical manuals and reference documentation

The agent intermittently fails to access information stored in SharePoint knowledge sources.

Typical behaviours include:

  • Agent reports that it cannot find relevant information
  • Agent fails to retrieve document content
  • Agent appears unable to search indexed content
  • Agent cannot generate output from the configured knowledge source
  • Agent falls back to generic LLM responses rather than grounded responses
  • Identical prompts sometimes work and sometimes fail without any configuration changes

The agent should:

  • Reliably retrieve content from configured SharePoint knowledge sources
  • Consistently ground responses on available documentation
  • Return the same result for identical prompts when no source documents have changed
  • Successfully process large technical documents after indexing is complete
Microsoft 365 and Office | SharePoint | Development
0 comments No comments

2 answers

Sort by: Oldest
  1. AI answer

    2026-09-11T09:49:32.4333333+00:00

    For an Agent Builder agent that intermittently fails to ground on SharePoint knowledge, the supported causes in this scenario are:

    1. Missing or incomplete SharePoint search indexing
      • SharePoint grounding depends on Microsoft Search indexing.
      • In SharePoint search, test a unique keyword from a target document. If the file does not appear, indexing is incomplete.
      • Recently uploaded content can also fail until indexing finishes.
      • If urgent, a SharePoint site admin can trigger reindex from Site Information > View all site settings > Search and offline availability > Re-index site.
    2. User permission trimming
      • The agent only returns content the signed-in user can read.
      • Verify the affected user can open the exact SharePoint file directly.
      • Test the same query with the same user in Microsoft 365 Copilot Chat. If that also fails, the issue is likely permissions or indexing.
      • For Agent Builder specifically, auto-sharing has a limitation: SharePoint files and folders are only auto-shared when sharing with specific security groups, not everyone in the organization. Manual permission updates might be required for the agent to return information from those sources.
    3. Protected or encrypted files
      • Files protected by an encrypting sensitivity label, Double Key Encryption, or a password can show as Ready but still return no response.
      • Verify whether the files prompt for a password, indicate DKE, or use an encrypting sensitivity label.
      • If allowed by policy, remove the protection or publish an unprotected copy in a SharePoint location the agent can access.
    4. SharePoint source or configuration limitations
      • Only the top three SharePoint search results are used to summarize and generate a response.
      • Only modern SharePoint pages are supported; modern pages with SPFx components are not supported.
      • Content from classic .aspx pages is not used to generate answers.
      • If a SharePoint file name contains null characters, the agent returns no results from that knowledge source.
    5. Agent Builder licensing and authentication requirements
      • Declarative agents grounded in SharePoint can fail at runtime with “Sorry, I wasn’t able to respond.” when the signed-in user does not have a Microsoft 365 Copilot license.
      • SharePoint and OneDrive knowledge sources require an active Copilot license.
      • For SharePoint grounding, the connection must use User authentication. Service principals aren’t supported.
      • The user must have at least Read permission on the target SharePoint site.
    6. Restricted SharePoint Search
      • If Restricted SharePoint Search is enabled for the tenant, SharePoint as a knowledge source is blocked and no results are returned.
      • Confirm with the SharePoint administrator that it is not enabled, or that the relevant sites are on the allowed list.
    7. Large-content reliability expectations
      • The available guidance does not state that large 300–500 page manuals are guaranteed to return consistent results after indexing.
      • What is documented is that retrieval depends on SharePoint search results, supported formats, supported page types, permissions, and licensing.

    A practical verification path for this case:

    1. Pick one document that fails intermittently.
    2. In SharePoint search, search for a unique phrase from that document.
      • If it does not appear, wait for indexing or request a site reindex.
    3. Open that exact file using the same signed-in account that uses the agent.
      • If access fails, fix SharePoint permissions.
    4. Check whether the file is encrypted, password-protected, or protected by DKE/sensitivity-label encryption.
      • If yes, use an unprotected copy if policy allows.
    5. Confirm the signed-in user has an active Microsoft 365 Copilot license.
    6. Confirm the agent uses User authentication, not a service principal.
    7. If the source is SharePoint pages, confirm they are modern pages and do not use SPFx components.
    8. Check whether Restricted SharePoint Search is enabled in the tenant.
    9. If the issue is limited to Agent Builder sharing behavior, manually update SharePoint file/folder permissions used by the agent.

    If identical prompts sometimes succeed and sometimes fail with no content changes, the documented causes that best match are indexing state, permission trimming, licensing/authentication requirements, Restricted SharePoint Search, or unsupported/protected content.


    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

  2. BabybooHN 3,040 Reputation points Independent Advisor
    2026-09-11T13:32:30.4533333+00:00

    Dear @Rohit Budha Borse

    Thank you for providing the detailed information. I understand that the agent intermittently fails to retrieve content from its configured SharePoint knowledge sources and may fall back to a generic response.

    To narrow down where the issue is occurring, could you please provide the following details?

    1. Does the issue occur with SharePoint sources only, or does it also occur when the same document is added directly as an attachment to the agent?
    2. Please provide the name of one affected document and its file type (for example, PDF or DOCX).
    3. Approximately how large is the affected file in MB/GB, in addition to the page count?
    4. When the issue occurs, does the agent consistently fail to retrieve information from the same document, or does it vary between different documents?
    5. Please provide one exact prompt that reliably reproduces the issue, along with:
      • The agent’s response when retrieval succeeds
      • The agent’s response when retrieval fails
    6. Does the agent show the SharePoint source as successfully configured/available, or is there any indication that the source is still being processed or indexed?
    7. Does the problem affect all users who can access the agent, or only a particular user?

    These details will help determine whether the behavior is related to knowledge-source configuration, document indexing/retrieval, document size/content, or the agent itself, rather than treating all failures as a single issue.

    If possible, please start with one specific document and one reproducible prompt. That will make it much easier to isolate the problem.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.