Building and customizing solutions using Microsoft 365 Copilot APIs and tools
Common causes of this intermittent behavior are:
- SharePoint search/indexing gaps
Copilot Studio uses Microsoft Search and only the top three SharePoint search results to generate a response. If indexing is incomplete or inconsistent, the agent might find the file name/link but fail to ground on the content. Troubleshooting:
- In SharePoint, search for a unique phrase from the target document and confirm the file appears in search results.
- If the document was uploaded or changed recently, wait for indexing to complete.
- If urgent, have a SharePoint site admin go to Site Information > View all site settings > Search and offline availability > Re-index site.
- Confirm the content is in a supported format and not on unsupported page types such as classic
.aspxpages or modern pages with SPFx components.
- User permission trimming
Copilot Studio respects Microsoft 365 security trimming. If the signed-in user intermittently appears unable to retrieve content across Copilot Studio, Microsoft 365 Copilot, and Teams, verify that the user has at least read access to the exact site and files. Troubleshooting:
- Open the exact SharePoint document directly with the affected user account.
- Test the same query with the same user in Microsoft 365 Copilot Chat. If it also fails there, that points to a permission or search indexing issue.
- Amend SharePoint permissions if needed.
- Protected files
Files protected by encrypting sensitivity labels, Double Key Encryption (DKE), or passwords can appear as available in SharePoint, but the agent cannot extract their content. Troubleshooting:
- Open the file and check whether it uses password protection, DKE, or an encrypting sensitivity label.
- Compare behavior with an unprotected file in the same source.
- If policy allows, remove the protection or publish an unprotected copy in an accessible SharePoint location.
- Authentication or app registration misconfiguration
Missing delegated scopes can cause silent no-result behavior. Required scopes include
Sites.Read.AllandFiles.Read.All, and those scopes must also be present in the agent authentication settings together withprofileandopenid. Troubleshooting:- Review the Microsoft Entra ID app registration permissions.
- In Copilot Studio, review the agent authentication settings and confirm the same scopes are configured.
- Confirm admin/user consent has been granted.
- If Restricted SharePoint Search is enabled in the tenant, SharePoint knowledge retrieval is blocked until the relevant sites are allowed.
- Filter conditions excluding content
If the agent uses SharePoint filters, or a topic-level Create generative answers node with Search only selected sources, the expected content can be excluded at runtime. Troubleshooting:
- In Copilot Studio, go to Knowledge > select the SharePoint source > Edit > Advanced settings and review filters such as Title, Author, Modified by, and Modified on.
- If filters use variables, add a debug step to confirm the runtime value is what is expected.
- In the topic node, check Properties > Data source and confirm the correct SharePoint source is selected, or turn off Search only selected sources.
- Known SharePoint grounding limitations
- SharePoint files with null characters in the file name can return no results.
- SharePoint and OneDrive grounding for declarative agents requires an active Microsoft 365 Copilot license for the signed-in user.
- SharePoint grounding requires User authentication; service principals are not supported for that scenario.
A practical end-to-end troubleshooting path is:
- Reproduce the failure with one specific document and one specific query.
- In SharePoint, search for a unique phrase from that document.
- Open the document directly as the affected user and confirm read access.
- Check whether the file is encrypted, password-protected, or DKE-protected.
- In Copilot Studio, review source filters and topic-level source selection.
- Verify the app registration and agent auth scopes:
Sites.Read.All,Files.Read.All,profile,openid. - Confirm the signed-in user has a Microsoft 365 Copilot license and that the connection uses User authentication.
- If the site or folder was renamed, regenerate the SharePoint source link and update the knowledge source.
- If the content is newly uploaded or changed, reindex the site and retest after indexing completes.
If the issue is truly intermittent with no content, permission, or configuration changes, the most likely areas to validate first are Microsoft Search indexing, permission trimming, and authentication configuration, because all three can produce silent “document found but content not grounded” behavior.