Azure AI Search SharePoint ACL query fails with HTTP 404 "User cannot be found" for the whole index when the querying user is not in a site's user list

Taylor Hawkins 0 Reputation points
2026-11-05T20:12:51.0633333+00:00

We use Azure AI Search (API 2026-08-01-preview) with the SharePoint indexer and ACL ingestion, including SharePoint groups support: sharePointConnectorAppRegistration and a SharePointSiteUrl field with sharepointSiteUrl: true. Documents are chunked with index projections.

Problem. A permission-filtered query (x-ms-query-source-authorization with the user's delegated token) fails with HTTP 404 for the entire index when the user is not in the site user list of any site in that index. The response is:

SharePoint REST /_api/web/siteusers/getbyemail('<user>')/groups failed (404). ... Microsoft.SharePoint.Client.ResourceNotFoundException: User cannot be found.

For example, one test account returned 404 for 6 of our 10 ACL indexes and 200 for the other 4. Another user hit it on the original index.

Impact. One site the user has never visited makes the whole index unusable for that user, including documents on sites they can access. Through agentic retrieval, the knowledge base silently skips the failing source. Users then miss content with no error, and the failure is not visible to the application.

Expected behavior. If the user cannot be found on a site, treat them as having no SharePoint group memberships there and still apply Entra user and group filters, instead of failing the whole index. Other users' queries on the same index return 200.

Questions.

  1. Is this the intended behavior or a defect?
  2. Can it be fixed so an unknown user means "no groups on that site"?
  3. Is there a supported setting that skips SharePoint group resolution for users who aren't found?
  4. Is the same site-level lookup the reason sharepointSiteUrl indexes are limited to 5 distinct site URLs?
Azure AI Search
Azure AI Search

An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.

0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.