Building and customizing solutions using Microsoft 365 Copilot APIs and tools
Microsoft 365 Copilot Retrieval API does not return documents protected with encrypted sensitivity labels (user-defined permissions)
beguem
0
Reputation points
Problem
The Retrieval API returns HTTP 200 with empty retrievalHits for all documents that have sensitivity labels with encryption and user-defined permissions applied, regardless of the calling user's rights on the label.
Direct Retrieval API call via Graph Explorer, authenticated as licensed user:
POST https://graph.microsoft.com/beta/copilot/retrieval
{
"queryString": "Schadenbearbeitung Kfz",
"dataSource": "sharePoint"
}
Response: HTTP 200
{ "retrievalHits": [] }
Environment
- Licenses: Microsoft 365 E5 + Microsoft 365 Copilot (assigned to calling user)
- Copilot Retrieval API pay-as-you-go billing: active for all users
- Microsoft Foundry SharePoint grounding tool (sharepoint_grounding_preview) configured per agent
- All permissions correctly configured: Files.Read.All, Sites.Read.All, Sites.Selected (application, admin consented on Foundry project managed identity)
- Same Entra tenant for Foundry and SharePoint
- At least VIEW and EXTRACT usage rights are assigned to the groups that are assigned to the encrypted labels and the calling user is in those groups.
Key findings from investigation
- Unencrypted documents work: A document without a sensitivity label was successfully indexed and returned by the Retrieval API. As soon as a sensitivity label with encryption and user-defined group permissions was applied, it disappeared from results immediately.
- Native M365 Copilot works fine. The same encrypted documents are successfully retrieved, summarised, and referenced by native Microsoft 365 Copilot chat. The sensitivity label is correctly displayed in responses.
- Graph Search API works fine.
POST /v1.0/search/queryreturns the same documents correctly, confirming they are indexed in Microsoft Search and accessible to the calling user. - Foundry SharePoint tool behaviour matches: Foundry SharePoint grounding tool returns
{"documents": []}for the same documents, consistent with the Retrieval API behaviour. Application Insights confirms the tool call completes with a real duration (~2700ms) and returns empty results — not a timeout or auth failure.
Questions
- Is the Retrieval API's semantic index unable to index AIP-encrypted documents with user-defined permissions as a background crawl service, regardless of the calling user's rights? If so, is this a known preview limitation or a permanent architectural constraint?
- Native M365 Copilot successfully retrieves and summarises these same encrypted documents. What is different about the Retrieval API's decryption path that causes this gap?
- Is there any supported sensitivity label encryption configuration that the Retrieval API CAN index and return?
- Is encrypted document support via user-defined sensitivity label permissions on the roadmap for the Retrieval API, and if so is there a planned timeline?
Microsoft Copilot | Microsoft 365 Copilot | Development
Microsoft Copilot | Microsoft 365 Copilot | Development
Sign in to answer