Copilot in Search Page is a SharePoint Framework SPFx extension for integrating a custom Copilot into your SharePoint search page.
Get your own free development tenant by subscribing to Microsoft 365 developer program
Pre-requisites:
- Azure App registration to set up Microsoft Entra ID authentication for your custom copilot.
- Azure App registration to manage and handle the SSO experience effectively within SharePoint.
- A Custom Copilot built in Copilot studio with a knowledge source set to be your SharePoint site.
- A SharePoint list for holding the copilot configurations. XML PnP list template in the Templates folder in root folder of the app will help you to create the list.
Add the configurations to the list columns as following:
- Title: any title
- BotUrl: The token endpoint for Microsoft Copilot studio. This can be found in the Microsoft Copilot studio designer, under Settings -> Channels -> Mobile App
- CustomScope: The scope defined for the custom API in the copilot app registration. In the first Pre-requisite.
- ClientId: The Azure App registration created for handling SSO. In the second Pre-requisite.
- Authority: The login URL for your tenant. For example: mytenant.onmicrosoft.com
- Greet: Should the copilot greet users at the beginning of the conversation. "true/false"
- BotName: The title for the copilot bot.
- PanelLabel: The Label for copilot dialog chat.
Solution | Author(s) |
---|---|
Copilot In Search Page | Mohammed Amer |
Version | Date | Comments |
---|---|---|
1.0 | August 04, 2024 | Initial release |
THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
- Follow the pre-requisites for creating
- Azure App regisrations
- Custom copilot in Copilot studio
- Configuration list then add a record for the required configurations as mentioned previously
- Clone this repository
- Ensure that you are at the solution folder
- in the command-line run:
- yarn install or npm install
- gulp serve
Description of the extension that expands upon high-level summary above.
This extension illustrates the following concepts:
- The extension is integrating a custom Copilot into your SharePoint search page where you ask the copilot questions, the it provide you Generative answers from the current SharePoint site content.
- Getting started with SharePoint Framework
- Building for Microsoft teams
- Use Microsoft Graph in your solution
- Publish SharePoint Framework applications to the Marketplace
- Microsoft 365 Patterns and Practices - Guidance, tooling, samples and open-source controls for your Microsoft 365 development