Edit

Generative answers pointing to SharePoint sources don't return results in Copilot Studio

Summary

This article helps you troubleshoot and resolve issues where generative answers nodes configured with SharePoint knowledge sources don't return results in Microsoft Copilot Studio. When a SharePoint data source is configured, several factors can prevent the Create generative answers node from providing a response, including missing search results, user permissions, app registration issues, file size limitations, or content moderation filtering. In such instances, the agent may return a message like "I'm not sure how to help with that. Can you try rephrasing?"

Note

Before continuing, make sure you have followed the instructions on how to set up generative answers over SharePoint.

For better search results, we recommend a Microsoft 365 Copilot license within the same tenant as your agent.

Search results are missing from SharePoint

When Copilot Studio searches SharePoint, only the top three search results are used to summarize and generate a response. If no search results are returned, the generative answers node doesn't provide a response.

Fix missing SharePoint search results

  1. Ensure that your Create generative answers node points to a SharePoint location with relevant content.

  2. Only documents in supported formats are used to generate responses.

    Note

    Only modern SharePoint pages are supported.

  3. It's possible that documents were only recently uploaded to SharePoint, but have yet to be indexed. It's also possible that there are settings that prevent some sites from appearing in search results. For more information, see Search results missing in SharePoint Online.

Missing user permissions for SharePoint generative answers

Generative answers over SharePoint rely on delegated permissions when searching. At a minimum, a user must have read permissions on the relevant sites and files, or no search results will be returned.

If the user is missing permissions, no results are returned, nor any errors or exceptions. For a user with no permissions, it appears as if no documents were found.

Fix missing SharePoint user permissions

Amend permissions so users can access the relevant sites and files. For more information, see Sharing and permissions in the SharePoint modern experience.

The app registration or agent are misconfigured for SharePoint

When admins configure generative answers over SharePoint, admins are expected to set up authentication with a Microsoft Entra ID, and configure extra scopes. If scopes are missing from the app registration or from the agent authentication settings, or if consent wasn't granted to the required scopes, no results are returned, nor any errors or exceptions. For a user, it appears as if no documents were found.

Fix misconfigured app registration or agent authentication

Add the necessary scopes to the App Registration and/or the agent's authentication settings, and grant consent.

The following example is a reference to a well configured app registration:

Screenshot of app registration permissions.

The following example shows the required authentication settings in Copilot Studio:

Screenshot showing Copilot Studio authentication settings.

File size limits for SharePoint generative answers

For SharePoint sources, if you don't have a Microsoft 365 Copilot license in the same tenant as your agent, generative answers can only process files up to 7 MB in size. You must also turn off the Enhanced search results feature.

If you have a Microsoft 365 Copilot license in the same tenant as your agent, the maximum file size is 200 MB. You must also turn on the Enhanced search results feature.

Larger files can be stored in SharePoint and are returned by a Microsoft Graph search, but aren't processed by generative answers. As an alternative, you can upload your own files, which can be up to 512 MB in size.

For a list of limits and supported SharePoint functionality, see Copilot Studio web app SharePoint limits.

Fix file size issues for SharePoint generative answers

If files relevant for your conversational AI experience exceed the size limitation, you might want to explore alternative architectures, such as using Microsoft 365 Semantic Indexing or connect your data to Azure OpenAI for Generative answers.

Content blocked by content moderation in Copilot Studio

When they generate responses, Copilot Studio agents moderate content that falls under the harm categories. When content gets moderated, generative answers doesn't provide a response or an indication that content was moderated. However, moderation events are logged when the agent is configured to send telemetry data to Azure Applications Insights.

After connecting your agent to Azure App Insights, you can use the following Kusto Query Language (KQL) query to find out if content was filtered:

customEvents
| extend cd = todynamic(customDimensions)
| extend conversationId = tostring(cd.conversationId)
| extend topic = tostring(cd.TopicName)
| extend message = tostring(cd.Message)
| extend result = tostring(cd.Result)
| extend SerializedData = tostring(cd.SerializedData)
| extend Summary = tostring(cd.Summary)
| extend feedback = tostring(todynamic(replace_string(SerializedData,"$","")).value)
| where name == "GenerativeAnswers" and result contains "Filtered"
| where cloud_RoleInstance == "myCopilot"
| project cloud_RoleInstance, name, timestamp, conversationId, topic, message, result, feedback, Summary
| order by timestamp desc

In the following example, the KQL query highlights an attempt to use generative answers filtered by content moderation:

Screenshot of Azure Application Insights.

Fix content moderation blocking generative answers