|
| 1 | +--- |
| 2 | +title: SharePoint Embedded copilots |
| 3 | +description: Details copilots Integration with SharePoint Embedded Applications |
| 4 | +ms.date: 02/19/2025 |
| 5 | +ms.localizationpriority: high |
| 6 | +--- |
| 7 | + |
| 8 | +# Overview |
| 9 | + |
| 10 | +> [!NOTE] |
| 11 | +> |
| 12 | +> SharePoint Embedded copilots is currently in private preview, the API surface and SDK are expected to change frequently. |
| 13 | +
|
| 14 | +SharePoint Embedded copilots is a powerful tool designed to enhance the functionality of SharePoint Embedded applications by integrating advanced Microsoft 365 features (Purview, Protection, etc.) |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | +## Billing/Licensing |
| 19 | + |
| 20 | +Currently, to use SPE copilot , the consuming tenant user of the application is required to have an [Microsfot 365 Copilot license](/copilot/microsoft-365/microsoft-365-copilot-licensing). In the future, the license-based model will be replaced with a consumption-based model. The usage of SPE copilots will be charged on a pay-as-you-go basis to your SharePoint Embedded application (that is, to the owning tenant). Stay tuned for billing model announcements during the preview period. |
| 21 | + |
| 22 | +## Why use SharePoint Embedded copilots |
| 23 | + |
| 24 | +SharePoint Embedded copilots harness a semantic index to power Retrieval-Augmented Generation (RAG), securely referencing your data within the Microsoft 365 boundary at query time. This ensures accurate, grounded AI responses while reducing reliance on broad knowledge models. A pay-as-you-go billing model is on the horizon, aligning costs with actual usage. |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | +### Application Scoping |
| 29 | + |
| 30 | +Application scoping in SharePoint Embedded copilots (SPE copilot) involves defining the boundaries and context within which the tool operates, ensuring its features and capabilities are tailored to meet the specific needs of different applications. This process helps customize the copilot's functionality, making it more effective and relevant for various use cases. |
| 31 | + |
| 32 | +When SPE copilot users query the LLM, it will only have access to files that the `User+Application` have access to. The effective permissions for the copilot session will be the intersection of your SharePoint Embedded application's permissions and the user's permissions. |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | +### Information Architecture |
| 37 | + |
| 38 | +Files in SharePoint Embedded are naturally [semantic indexed](spe-da-adv.md#semantic-index). This semantic index underpins retrieval augmented generation [(RAG)](spe-da-adv.md#rag--retrieval-augmented-generation-) workflows by providing relevant context from your stored content at query time. In essence, it [grounds](spe-da-adv.md#grounding) the AI responses, ensuring they directly reference accurate information in your containers rather than relying on general knowledge alone. |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | +With SharPoint Embedded copilots , you can further ground the LLMs reponses on [specific files or drive items.](spe-da-adv.md#scoping-your-copilot-to-specific-content). |
| 43 | + |
| 44 | +### Microsoft 365 Boundary |
| 45 | + |
| 46 | +Data is kept secure: data never leaves the tenant boundary and storage respects data residency settings. |
| 47 | + |
| 48 | +Each container instance of a container type in the SPE partition is its own security and compliance boundary. |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | +## How to use SharePoint Embedded copilots |
| 53 | + |
| 54 | +### How to build your copilot |
| 55 | + |
| 56 | +Currently, we offer a way to incorporate this feature into your custom application is through our React SDK library written in TypeScript. Plans to support additional frameworks and environments will be announced. The SDK is configured with the containerId instance of your containerType, as well as the authorization and authentication token logic you provide through a callback. It will embed itself as an iFrame into your host application. By default, the iFrame is given a `frame-ancestors` property that prevents it from being embedded by any host until configured. Details are provided below. |
| 57 | + |
| 58 | +#### SPE TypeScript React Application |
| 59 | + |
| 60 | +Follow the [quick start guide](../../tutorials/spe-da-vscode.md) to get started with a prebuilt sample application. |
| 61 | + |
| 62 | +### API Documentation |
| 63 | + |
| 64 | +The SharePoint Embedded React TypeScript NPM Package, available at [here](https://github.com/microsoft/SharePoint-Embedded-Samples/spe-react-npm-package/api-extractor), provides the SDK for integrating SharePoint Embedded copilots into your client applications. |
| 65 | + |
| 66 | +## Frequently Asked Questions |
| 67 | + |
| 68 | +### Is consumption-based billing available for SPE copilot? |
| 69 | + |
| 70 | +Currently you need a M365 Copilot license enabled for your user to use SharePoint Embedded copilots . When consumption-based billing is enabled you will no longer require a license however, you will be required to use a Standard Container type. |
| 71 | + |
| 72 | +***Trial Container Types expire after 30 days, for this reason we recommend starting off with Standard Container types. Currently there is no upgrade path from Trial to Standard container types.*** |
| 73 | + |
| 74 | +### Should I use a standard or trial container type? |
| 75 | + |
| 76 | +Once consumption-based billing is enabled, we will be disabling using this feature with Trial Container types and it will only be enabled on Standard container types going forward. Please follow this [guide](../../getting-started/containertypes.md) to get started on creating your Standard Container type. |
| 77 | + |
| 78 | +## SharePoint Embedded copilot Support |
| 79 | + |
| 80 | +### Chat Control Feedback Dialog |
| 81 | + |
| 82 | +If you encounter any issues with the chat control, please use the thumbs up and down feedback buttons to report the problem. This method is preferred for sending feedback because it provides us with telemetry data that helps us diagnose and troubleshoot the issue more effectively. |
| 83 | + |
| 84 | +When you click the thumbs down button, a feedback dialog will appear. Please include any relevant information in this dialog. |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | +## Caveats |
| 89 | + |
| 90 | +### Configuration |
| 91 | + |
| 92 | +#### Required ContainerType Configuration |
| 93 | + |
| 94 | +##### DiscoverabilityDisabled |
| 95 | + |
| 96 | +This [flag](../../administration/developer-admin/dev-admin.md#container-type-configuration-properties) prevents copilot from discovering [drive items](/graph/api/resources/driveitem) in the specified container type. If you have an existing container type and are setting this value to false, please wait 24 hours to ensure the container type configuration is fully propagated before creating a new container, uploading files there, and trying out copilot on folders/files of that new container. |
| 97 | + |
| 98 | +Here is an example of setting the flag to false with [Set-SPOContainerTypeConfiguration](/powershell/module/SharePoint-online/set-spocontainertypeconfiguration#examples) |
| 99 | + |
| 100 | +```powershell |
| 101 | +Set-SPOContainerTypeConfiguration -ContainerTypeId 4f0af585-8dcc-0000-223d-661eb2c604e4 -DiscoverabilityDisabled $false |
| 102 | +``` |
| 103 | + |
| 104 | +Discoverability can also be disabled using the Visual Studio Code SharePoint Embedded extension |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | +##### CSP Policies |
| 109 | + |
| 110 | + The Content-Security-Policy (CSP) for embedded chat hosts, ensures that only specified hosts can load the `chatembedded.aspx` page. This helps in securing the application by restricting which domains can embed the chat component. |
| 111 | + |
| 112 | + It is intended to allow consuming tenant SPE admins to set an allowlist of hosts that they will allow to embed the SPE copilot in an iFrame. Specifically, the value they set here will be used in a Content-Security-Policy header as a frame-ancestors value. |
| 113 | + |
| 114 | +> [!NOTE] |
| 115 | +> |
| 116 | +> If this configuration is not set, the [Content-Security-Policy](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy) will default be set to |
| 117 | +> [frame-ancestors](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors): ‘none’ which means no one can embed the copilot. |
| 118 | +
|
| 119 | +Below are example commands to use the [Connect to SharePoint Online using PowerShell](/powershell/sharepoint/sharepoint-online/connect-sharepoint-online) commands: |
| 120 | + |
| 121 | +- [Set-SPOApplication](/powershell/module/SharePoint-online/set-spoapplication) to set the `CopilotEmbeddedChatHosts` property. |
| 122 | +- [Get-SPOApplication](/powershell/module/SharePoint-online/get-spoapplication) to get the `CopilotEmbeddedChatHosts` property. |
| 123 | + |
| 124 | +```powershell |
| 125 | +# Note this MUST be run in Windows PowerShell. It will not work in PowerShell. |
| 126 | +Import-Module -Name "Microsoft.Online.SharePoint.PowerShell" |
| 127 | +Connect-SPOService "https://<domain>-admin.sharepoint.com" |
| 128 | +# Login with your admin account. |
| 129 | +... |
| 130 | +
|
| 131 | +Set-SPOApplication -OwningApplicationId 423poi45 -CopilotEmbeddedChatHosts "http://localhost:3000 https://contoso.sharepoint.com https://fabrikam.com" |
| 132 | +
|
| 133 | +# This will set the container type configuration “CopilotEmbeddedChatHosts” accordingly. |
| 134 | +... |
| 135 | +
|
| 136 | +Get-SPOApplication -OwningApplicationId <OwningApplicationId> | Select-Object CopilotEmbeddedChatHosts |
| 137 | +
|
| 138 | +OwningApplicationId : <OwningApplicationId> |
| 139 | +OwningApplicationName : SharePoint Embedded App |
| 140 | +Applications : {<OwningApplicationId>} |
| 141 | +SharingCapability : ExternalUserAndGuestSharing |
| 142 | +OverrideTenantSharingCapability : False |
| 143 | +CopilotEmbeddedChatHosts : {http://localhost:*} |
| 144 | +
|
| 145 | +``` |
| 146 | + |
| 147 | +#### Optional Configuration |
| 148 | + |
| 149 | +##### Authentication and 3P Cookies |
| 150 | + |
| 151 | +The iFrame used by SharePoint Embedded copilots attempts to authenticate using third-party cookies. If third-party cookies are disabled in the user's browser, the iFrame will not be able to authenticate automatically. In such cases, a popup will be displayed prompting the end user to log in manually. This ensures that the authentication process can still be completed even when third-party cookies are not available. |
| 152 | + |
| 153 | +## Advanced Topics Overview |
| 154 | + |
| 155 | +The [advanced topics](spe-da-adv.md) delve into how SharePoint Embedded copilots use a semantic index to facilitate Retrieval-Augmented Generation (RAG), ensuring responses are accurately grounded in your stored content. You’ll also learn how to scope your copilot to specific data sources, set up various file formats, and configure locale options to tailor the copilot experience. By exploring concepts like grounding, semantic indexing, and RAG workflows, you can optimize your copilot’s effectiveness and maintain security within the Microsoft 365 boundary. |
0 commit comments