Create and Deploy custom copilot to MS Teams and SharePoint Site (Part 1)
Custom Copilot using Copilot Studio published to MS Teams:
In this two part series we see how to create a custom copilot using Microsoft Copilot Studio for Generative Answers based on the SharePoint Knowledge DB(files uploaded to SharePoint) and deploy the copilot to MS Teams and a SharePoint site.
Deploying custom copilot to MS Teams and SharePoint require an authentication enabled. Lets create an Azure Service Principal(Client Id and Secret) required to enable Manual Authentication as deploying to SharePoint requires Manual Authentication.
Create App Registration for Authentication:
Login to https://portal.azure.com -> Microsoft Entra ID -> Create New App Registration
Add delegated API permissions: openid, profile, Files.Read.All, Sites.Read.All from Microsoft Graph
Add a Scope from 'Expose an API' blade. This is required to publish the copilot to SharePoint site. You can ignore this step if you are publishing your copilot to MS Teams only.
Create a SharePoint Site and Upload documents:
Now, Create a SharePoint site and upload few documents to the site.
Create custom Copilot using Copilot Studio:
We now navigate to Copilot Studio - https://copilotstudio.microsoft.com and create a custom copilot
Enable Manual Authentication from Settings -> Security -> Authentication and select service provider as 'Azure Active Directory v2' and enter client id, secret, Token exchange URL(required to host on SharePoint site) and add below scopes: profile openid Files.Read.All Sites.Read.All
Makes sure you add these scope otherwise Generative Answers will not be able to access SharePoint content via Graph API
Add SharePoint site as a source to 'create generative answers node': Go to Topics -> System tab -> Select Conversational boosting -> click Edit under Data Sources -> Enter SharePoint site URL with the documents uploaded and Save
Verify if the copilot is generating answers based on the uploaded data
Now lets publish the copilot to MS Teams
Go to Channels -> select Microsoft Teams and Turn on Teams. You should see below
Chat with Copilot in MS Teams:
Click on Open copilot. Custom copilot should now be opened in MS Teams and lets start asking questions based on the content in SharePoint
In, Part 2 we will see how to publish the same custom copilot to SharePoint site as a canvas component.
Great post Mahesh !!
ReplyDelete- Jin