Copilot agent don't retreving me the file names of sharepoint

David Tabernero 0 Reputation points
2026-11-13T16:29:47.42+00:00

Hi
I've configured a copilot agent that should read a directory of my sharepoint. In these sharepoint I've uploaded 3 txt files and it has another folder. When I prompt that copilot list me the directory it retrives me one file but the other 2 files doesn't tell them to me.
I've checked the knowledge and the sharepoint link and everyting it's correct.

Any help?

Thanks

Microsoft Copilot | Microsoft 365 Copilot | Development

3 answers

Sort by: Oldest
  1. AI answer

    2026-11-13T16:30:05.6533333+00:00

    If the SharePoint knowledge source is configured and shows as ready, the most common reasons some files are not returned are these:

    1. Verify the files are actually usable by the knowledge source
      • On the Knowledge page, confirm the missing files or folder are reported as Ready.
      • If a file appears in the source but still never answers, possible causes include:
        • unsupported characters in the SharePoint file name
        • sensitivity settings such as Confidential or Highly Confidential
        • password protection
        • unsupported file type
        • the file or folder not being shared with the account being used
    2. Check user permissions on the exact files
      • Copilot Studio respects Microsoft 365 security trimming.
      • The signed-in user must have at least read access to the specific SharePoint site and files.
      • Open each missing file directly in SharePoint with the same user account used to test the agent.
      • If possible, test the same query in Microsoft 365 Copilot Chat. If it also cannot retrieve the content, that points to a permission or search indexing barrier.
    3. Check whether the files are protected
      • Files protected by an encrypting sensitivity label, Double Key Encryption (DKE), or a password can appear as Ready but still return no response.
      • Open each missing file in SharePoint or the desktop app and check whether it shows encryption, DKE, or password protection.
      • If organization policy allows it, remove that protection or publish an unprotected copy in a SharePoint location the agent can access.
    4. Check the SharePoint source path
      • If the SharePoint site or folder was renamed after the knowledge source was added, the source link can break.
      • In that case, update the knowledge source with a newly generated SharePoint link.
    5. If manual authentication is being used, verify the app registration and agent scopes
      • The Microsoft Entra ID app registration must include Sites.Read.All and Files.Read.All.
      • The agent authentication settings must also include Sites.Read.All and Files.Read.All alongside profile and openid.
      • If consent for those scopes is missing, the agent can return no results without showing an error.
      • If Restricted SharePoint Search is enabled in the tenant, SharePoint knowledge sources are blocked until the relevant sites are allowed.
    6. Check whether the missing item is a subfolder scenario
      • Copilot Studio can index only up to the maximum number of files, folders, and subfolders for a SharePoint or OneDrive folder. Remaining items are not processed, and it does not indicate which ones were skipped.

    A practical test path for this case:

    1. Open the 2 missing .txt files directly in SharePoint with the same account.
    2. Confirm those files are not encrypted, password-protected, or labeled with encrypting sensitivity protection.
    3. On the Knowledge page, verify whether those files are actually usable and not just present in the source.
    4. If manual auth is configured, verify Sites.Read.All and Files.Read.All exist in both the app registration and the agent authentication settings, and that consent was granted.
    5. If the folder or site was renamed, replace the SharePoint source link.

    If the agent can answer from one file but not the other two, that usually points to file-level permissions, protection, unsupported file conditions, or authentication scope issues rather than the SharePoint link itself.


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

    Was this answer helpful?

  2. Billy Peralta 0 Reputation points
    2026-11-16T04:53:03.98+00:00

    Hi David,

    Thanks for clarifying. So you need the agent to read all three process output files, compare them with your Excel sheet, and decide what to do.

    The problem is that adding a SharePoint folder as knowledge doesn't guarantee the agent will read every file each time. It searches for relevant information, which isn't the same as processing every file.

    There's also one thing worth checking: how did you add the SharePoint files?

    In Copilot Studio, the "Upload files > SharePoint" knowledge option doesn't currently support .txt files. Other options, including Microsoft 365 Copilot Agent Builder, have different file support.

    If your agent must process every file, I'd handle that part with Power Automate instead.

    A flow could read each text file, get the relevant rows from your Excel table, and process them one by one. It could then return the results to the agent.

    That way, you can check that all three files were processed instead of relying on whichever documents the agent finds through search.

    Are you building this in Copilot Studio or Microsoft 365 Copilot Agent Builder? That will help narrow down the best way to set it up.

    Microsoft's documentation on SharePoint knowledge sources: Add unstructured data as a knowledge source

    Was this answer helpful?


  3. Ashlesha Pawar (Tata Consultancy Services Limited) 650 Reputation points Microsoft External Staff
    2026-11-16T09:14:22.8833333+00:00

    Hi David,

    Thanks for confirming that you’re using Copilot Studio. No—you would not need to manually define every possible error pattern in Power Automate. The flow would handle collecting all the files; an AI prompt would still perform the analysis.

    The distinction is between retrieving relevant knowledge and processing every input file. SharePoint knowledge retrieval can provide relevant passages, but it does not guarantee that all three files will be read during each execution. That alone does not establish why your two files were missed, but it makes knowledge retrieval unsuitable as the only mechanism for this daily batch requirement.

    You can extend your existing automation as follows:

    1. Collect the daily batch. After all expected attachments have been uploaded, identify the files for that day and retrieve each file’s complete text. Explicitly decide whether subfolders should be included.
    2. Read the Excel reference data. Use Excel Online (Business), such as List rows present in a table, with pagination enabled if necessary.
    3. Pass the content to an AI prompt. Power Automate’s AI Builder → Run a prompt action accepts inputs from earlier actions. Supply the log text and relevant Excel rows, and ask the model to identify issues, explain the supporting evidence, and recommend handling based on the reference data.
    4. Record completion for each file. Store the filename, analysis result, and processing outcome. Report missing or failed files explicitly instead of producing a seemingly complete summary.

    For example, the prompt could say:

    Analyze this process log against the supplied reference table. Identify errors, anomalies, and unexpected outcomes without limiting your analysis to predefined keywords. Quote supporting log lines, identify any matching reference-table guidance, and flag cases where no guidance exists rather than inventing a remediation.

    If the logs are small enough, analyze all three together when cross-file reasoning is important. For larger logs, use bounded sections followed by a consolidated analysis, preserving file identifiers and context. AI analysis can still miss issues, so validate it against representative logs and require review before consequential remediation.

    One separate point: the documented Upload files → SharePoint knowledge route currently does not list .txt as supported. This restriction is specific to that ingestion route; it does not prevent a flow from reading text and passing it directly to a prompt. Since your files change daily, extending the existing ingestion flow also avoids relying on knowledge-index refresh timing.

    Microsoft references:

    In short: Power Automate ensures every file is supplied; AI still identifies and interprets the potential problems. Applicable licensing and AI capacity would need to be checked for the prompt execution.

    Was this answer helpful?

    0 comments No comments

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.