Announcements
Hi everyone,
I’ve implemented an SPFx web part that captures the clicked element (folder name) on a SharePoint page and passes it to a Copilot agent via query string. The Copilot agent reads this value and stores it as a global variable.
The agent uses a SharePoint document library as its knowledge source, which contains multiple folders and subfolders. My requirement is:
When the SPFx web part sends a folder name, I want the Copilot agent to restrict its knowledge scope to only that folder—so all responses should be based solely on documents within that folder.
I’m looking for a way to implement this with minimal customization. Ideally, I’d like to avoid re-indexing the entire library or creating separate agents per folder.
Has anyone tackled a similar scenario? What’s the best way to dynamically filter the knowledge base in Copilot based on a folder name passed from SPFx?
Thanks in advance!
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Users!
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Valantis 594
chiaraalina 170 Super User 2026 Season 1
deepakmehta13a 118