Use SharePoint or OneDrive content for generative answers

Generative Answers over SharePoint or OneDrive works by pairing your copilot with a URL, such as contoso.sharepoint.com/sites/policies. When a copilot user asks a question and the copilot doesn't have a topic to use for an answer, the copilot searches the URL and all subpaths. For example, a URL such as contoso.sharepoint.com/sites also includes subpaths like contoso.sharepoint.com/sites/policies. Generative answers summarize this content into a targeted response.

When you publish your copilot, the calls using generative answers are made on behalf of the user chatting with the copilot, using the authentication settings configured in the copilot. By default, Copilot Studio is configured for Microsoft Entra ID authentication in Teams and PowerApps, which works in environments such as Microsoft Teams, PowerApps, and Microsoft 365 Copilot.

Note

It's possible to use generative answers with SharePoint data in Microsoft Teams chats, and not require manual authentication. To use this method for a previously published copilot, reconfigure the copilot to use Microsoft Entra ID authentication in Teams and PowerApps and then publish it again to Microsoft Teams. It might take a few hours before this change takes effect. If a user is in the middle of a conversation and the change doesn't appear to have taken effect, they can type "start over" in the chat to force the conversation to restart with the latest version of the copilot. These changes are now available for Teams 1:1 chats between the user and the copilot. They are not yet available for group chats or channel messages.

If you want to use manual authentication for your copilot, see Advanced authentication scenarios.

Due to memory limitations, generative answers can only use SharePoint files that are under 3 MB. If a file is larger than 3 MB, consider splitting it into multiple smaller files.

For instructions on how to add SharePoint as a knowledge source, see Add SharePoint and OneDrive knowledge to a copilot.

Use SharePoint or OneDrive

Important

When using the Generative Answers node in the authoring canvas, you may encounter an error on the authoring canvas and in the Topic Checker when Integrated Security has been chosen. This error is benign, and does not prevent the feature from working. This error will be resolved in an upcoming deployment.

  1. Open the Data source configuration pane from one of two places:

    1. On the Create generative answers node, select Edit under Data sources.

      Screenshot that shows where to select the Properties pane.

    2. Alternatively, select the ... in the Create generative answers node, then select Properties to open a pane, and finally select Data source.

  2. Open the Classic data options.

    Screenshot that shows the options available under Classic data.

  3. Under SharePoint in the Data source pane, add the SharePoint or OneDrive URLs you want to use. Separate multiple URLs with manual line breaks (with Shift + Enter).

    Screenshot that shows the SharePoint field in the Data source pane.

    Note

    • We recommend to omit https:// from the URL. Recognized SharePoint URLs are from the sharepoint.com domain.
    • SharePoint site URLs can't be more than two levels deep.
    • Only modern pages are supported.
    • Content from classic ASPX pages on SharePoint aren't used to generate answers.
  4. Select Save at the top to save your topic changes.

  5. Test your copilot with phrases that you expect to return content.

    If the user account you used to sign in to powerva.microsoft.com doesn't have access to the SharePoint site, you don't get content or you might see a system error.

Advanced authentication scenarios

Copilot Studio is preconfigured to authenticate users using Microsoft Entra ID authentication in Teams and PowerApps to access SharePoint sources when they're connecting to a copilot through Microsoft Teams, PowerApps, or Microsoft 365 Copilot. However, if you need to manually configure authentication, the following steps are required for generative answers to work with OneDrive/SharePoint data sources.

  • To authenticate your copilot, see Authentication.

  • For instructions on how to create the needed Microsoft Entra ID application registration, see Configure user authentication with Microsoft Entra ID. When creating this registration you or your admin must specify the Sites.Read.All, Files.Read.All scopes in the Microsoft EntraID App Registration.

  • Selecting either No authentication or Only for Teams specifies that your copilot won't retrieve information from SharePoint or OneDrive.

  • When configuring authentication, scopes control user access. Specify Sites.Read.All, Files.Read.All in the scopes field near the existing profile and openid values in Copilot Studio. These scopes don't give users increased permissions when using the copilot, but allow their permissible content from the SharePoint site as configured for generative answers.

  • This configuration only applies to generative answers, and doesn't apply to Power Platform Connectors.

Important

  • Information sources defined in the Generative answers node take priority at the copilot level. Copilot-level sources function as a fallback.
  • If Restricted SharePoint Search is enabled, use of SharePoint is blocked.