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.


1 answer

Sort by: Oldest
  1. Tajamul Khan 0 Reputation points
    2026-11-22T04:59:53.53+00:00

    The part I would test separately is the silent loss of a source through agentic retrieval. Put a uniquely searchable test document on site A that the test user is allowed to read. Keep site B in the same index and use a test user who is absent from the site B user list.

    Run the same query directly against the index and through the knowledge base with that test user. If the direct query returns 404 while the knowledge base returns a successful response without the known document, you have a small reproduction that shows exactly where the behavior differs. I would repeat it with a control user present on both sites and keep permission filtering enabled for both tests.

    Was this answer helpful?

    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.