Share via

Issue with SharePoint file links in Copilot Studio references

Jaimes Fuentes, Diana 20 Reputation points
2026-03-30T21:29:37.23+00:00

Hello team,

I’m currently using Copilot Studio and have configured a SharePoint folder as a knowledge source. The folder contains files with spaces in their names (e.g., “Medical benefits.pdf”).

The agent responds correctly according to the prompt; however, when it generates the references section, the file link appears to break due to the space in the file name.

Is there a way to handle or fix this behavior without needing to rename the files in SharePoint?

Thanks in advance for your support.

Microsoft Copilot | Other
0 comments No comments

Answer accepted by question author
  1. Ashlesha Pawar (Tata Consultancy Services Limited) 75 Reputation points Microsoft External Staff
    2026-03-31T12:02:00.5366667+00:00

    @Jaimes Fuentes, Diana

    We are aware of an issue in Microsoft Copilot Studio where file links in the References section may not render correctly when filenames contain spaces (for example, “Medical benefits.pdf”).

    This occurs because spaces in URLs are not always properly encoded (e.g., %20) in the auto-generated references. Please note that this does not affect the agent’s ability to retrieve or use the content, only how the reference link is displayed.

    Workarounds (without renaming files)

    1. Use encoded URLs manually (if customizing responses) Replace spaces with %20 in file paths:

    • Medical benefits.pdfMedical%20benefits.pdf

    2. Use SharePoint sharing links (recommended) From Microsoft SharePoint:

    • Use “Copy link” to generate a sharing URL
    • These links are already properly encoded and reliable

    3. Use Power Automate for link formatting (advanced) With Microsoft Power Automate:

    • Reconstruct links dynamically
    • Apply encodeUriComponent() to file names before returning them

    4. Custom reference rendering If using adaptive cards or custom topics:

    • Render your own links instead of relying on the default References section

    Additional notes

    • There is currently no configuration available in Copilot Studio to control reference link encoding
    • This behavior is a known limitation, and improvements may be introduced in future updates

    If this issue significantly impacts your scenario, we recommend submitting feedback through the appropriate Microsoft support or feedback channels.


1 additional answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

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.