Preview unavailableThe idea behind the sample
The finished project for the tutorial Connect your Copilot UX component to SharePoint data. It's the my-copilot-app project from Build your first SharePoint Copilot App with the tutorial changes applied.
The agent passes a site URL to the MyCopilotAppTool tool in the siteUrl parameter. The MyCopilotApp component uses spHttpClient to show the lists on that site and the first 25 items of the list the user selects. It handles a missing URL, a URL that isn't a site, a site the user can't access, and a site that doesn't exist. The component uses no framework, and all code runs in the browser.
Make it your own
Start with the author's setup instructions, explore the implementation, and adapt the pattern to your environment. Sample code stays in its original repository, together with its requirements, license and contribution history.
Read the source documentationA closer look
Preview unavailable
Preview unavailableKeep exploring
- Connect your Copilot UX component to SharePoint data — Tutorial: pass a site URL to the tool and show the lists and items on the site with the SharePoint REST API.
- Build your first SharePoint Copilot App — Create a SharePoint Copilot App with SPFx, test it in the Copilot Workbench, and use it in Microsoft 365 Copilot.
- Overview of the SharePoint Framework — The SharePoint Framework (SPFx) is a page and web part model that provides full support for client-side SharePoint development.
