SharePoint Copilot Deployment using Microsoft Copilot Studio: A Practical Guide - Netwoven
Blog

SharePoint Copilot Deployment using Microsoft Copilot Studio: A Practical Guide

By Prasanta Das  |  Published on March 22, 2024

SharePoint Copilot Deployment using Microsoft Copilot Studio: A practical guide

Introduction

As it started, I was tasked to build a custom application using SPFX (SharePoint Framework Extensions) and React JS. I realized that Netwoven has significant assets stored in SharePoint Document libraries within a dedicated SharePoint site.  It has lot of use cases with probable solutions, and various components of different modern and cutting-edge UI libraries. In addition, Netwoven stores various branding artefacts like layouts, color schemes, and visual elements based on user preferences or company branding standards.

I started navigating through the documents to find out the most suitable components for use in my project. I also needed a comparison to find out which one would be better and easily maintainable for the future. Finally, I had some specific requirements for slider, grid components, floating labels and modern SCSS usage. So, I was looking for some reusable codes and components to save development time.

I used all kinds of searches possible within the repository but soon realized that my way of searching will not produce fruitful results as the documents are scattered in the different subfolders. This makes comparison time consuming across several documents. So, I thought to delegate this task to SharePoint Copilot. This is how I started building a Copilot using Microsoft Copilot Studio.

Microsoft Copilot Studio is a graphical development environment to build Copilots using generative AI, sophisticated dialog creation, plugin capabilities, process automation, and built-in analytics that work with Microsoft conversational AI tools.

While developing the Copilot, I needed to ensure that only authorized persons should have access to the information in the document library. It should also be available on other channels, like Teams for example.

A Note about SharePoint Copilot

SharePoint is a very flexible content platform powering innovation across Microsoft 365. SharePoint is also a secure place to store, organize, share, and access information from any device. In my case, the focus was to develop a copilot which would help me extract information from the documents (pdf, word, PPT) residing in the document libraries in a secure and reliable way. Microsoft Copilot Studio helps to achieve it in very few simple steps. The users will get information from the documents or pages to which they have access. The Copilot will help front end engineers to use and compare UI frameworks available in the repository e.g., for React platform in this case.

Prerequisites for the setup of the SharePoint Copilot
  1. A SharePoint site and a document library with your documents (PDF, Word and PPT)
  2. An account in Microsoft Copilot Studio (work or personal)
  3. An Azure app that helps to authenticate the Copilot to access SharePoint Document library (Global Administrator)
  4. Delegated Microsoft Graph permission for reading the site and files (Global Administrator)
Creating the Copilot
  • Login into Microsoft Copilot Studio
  • Create a Copilot with the following information
    • Copilot name
    • Provide SharePoint site URL (Here, only URL of the document library is provided. We can give multiple URLs also)
A Note about SharePoint Copilot
  • Click create and studio will create a Copilot within a few minutes

The challenges

Once the bot is created it can instantly generate answers from the provided data source. In this case, this is the document library of SharePoint. Click on the question that is being asked to the bot. Here the question is “What is Chakra UI”. The question uses the system topic “Conversational Boosting”, but it encountered some error in Topic checker (highlighted).

A Note about SharePoint Copilot - challenges

Once the topic checker is clicked it showed an error “AuthenticationInputNotEnabled”. SharePoint requires manual authentication configuration when generating answers from a data source. This is necessary because it utilizes the connected end-user’s context for search operations. The purpose is to ensure that only content accessible to the user is returned. For that, the delegated API permissions are needed to configure to the Graph API. This error will prevent the Copilot from working after deploying in different channels like SharePoint, Teams etc.

A Note about SharePoint Copilot - The Challenges

The Solution

The following steps need to be taken to fix the issue.

Authentication
The steps for creating manual authentication are described below.
  1. Click on the Security tab under “Settings” from left navigation pane
  2. Click “Authentication”
  3. Select “Manual Authentication”
  4. Check “Require users to sign in”

Here, you are required to provide a “Client ID” and a “Client Secret”.

Register App and provide delegated graph permission in Azure Portal

A “Global Administrator” login is required to complete the following steps. So, if you are not an administrator you can copy the Redirect URL and provide it to the IT team to get the client ID and secret.

Steps are as below:
  • Login to Azure portal
  • Register an app with the same redirect URL with platform “Web” as highlighted
Register App and provide delegated graph permission in Azure Portal
  • Register the app, copy the client id from the “Overview” tab.
  • Create a secret from “Certificates and secrets” in the left navigation. Please remember to copy the secret id and value and store in a safe document.
  • Go to “API permissions” from left pane and provide Microsoft Graph delegated permission to the following and don’t forget to provide admin consent.
    • Files.Read.All
    • openid
    • profile
    • Sites.Read.All
    • User.Read
Register App and provide delegated graph permission in Azure Portal - Register
Copilot for Microsoft 365 – Unveiling the Dynamics and Capabilities

Microsoft 365 Copilot is coming soon but is your organization ready? As organizations increasingly embrace Microsoft 365 Copilot for enhanced collaboration and productivity, the strategic planning of its rollout becomes critical.

Get the eBook
Get back to Microsoft Copilot Studio

Go back to the Microsoft Copilot Manual Authentication form. Give the Client ID and paste the copied “value for client secret” in the “Client Secret” field and save.

Microsoft Copilot Studio

After saving the Manual Authentication, the topic checker will sometimes display the error. Once the page is refreshed the error should go away. Now the bot is ready to be published on other channels.

Deploying the Copilot to SharePoint and Teams

Next click on the “Publish” tab in left navigation of Microsoft Copilot Studio.

Once published, scroll down to the bottom of the same page, and click on the link “Go to Channels”. This will open all the possible channels available to configure the bot.

Deploying the Copilot to SharePoint and Teams
Deploy in SharePoint

Click on custom website to get the embed code. Copy the code. Open any SharePoint page and add an “embed” web part and paste the embed code. There are chances that you may see the Copilot web part is not working. The solution is to add “copilotstudio.microsoft.com” in “HTML Field security” settings from site collection admin settings.

Deploy in Teams

Click on “Microsoft Teams” and then click “Turn on Team” which will automatically trigger the setup for creating a Teams app. Once the set up completes, the app is created and needs to be added in the Microsoft Teams.

The End Product

Users must first log in to authenticate themselves. This is by design to make sure that this copilot may be used by the intended users only.

Copilot Studio - The End Product
Copilot Studio - The End Products

Now you are ready to go. Any user who has access to the SharePoint site and document library will see the bot fetching answers from the files residing in the document library and the whole site. Note that the accuracy and performance will depend on the availability of contextual documents and pages in the library, which grows over time.

Conclusion

It is well known that copilots in SharePoint can combine the power of Large Language Models (LLMs), your data in SharePoint and create powerful solutions using the SharePoint Framework, Microsoft Graph, and Power Platform.

In this post, we have used the copilot in harnessing the organization’s brand center to assist the UI/UX developers in choosing the right and reusable components from the repository. And all within our existing commitments to data security and privacy in the enterprise. We did some micro segmentation to get AI assistance that can create or suggest layouts, colour schemes, and visual elements based on user preferences or company branding standards. This facilitates UI developers in crafting applications and designing layouts that maintain consistency, appeal to users, offer easy navigation, optimize performance, and improve overall user experience and productivity. This can easily be extended to personalized content recommendation by analyzing user interests and past behavior resulting in ease of development and higher satisfaction of the users. Moreover, Copilots can be used in other areas of the organization e.g., sales help and support issues, employee health and vacation benefits, common employee questions for businesses and many others.

We would love to have your comments. Please contact us for more information.

Leave a comment

Your email address will not be published. Required fields are marked *

Unravel The Complex
Stay Connected

Subscribe and receive the latest insights

Netwoven Inc. - Microsoft Solutions Partner

Get involved by tagging Netwoven experiences using our official hashtag #UnravelTheComplex