Troubleshoot SharePoint permission filtering in Foundry IQ (Azure AI Search)

Note

Foundry IQ (Azure AI Search) provides direct indexing and query APIs alongside higher-level knowledge source and knowledge base APIs for managed retrieval. Use the Azure portal, REST APIs, or Azure SDKs to configure these capabilities, or connect agents to knowledge bases in the Microsoft Foundry portal.

Use this article if query-time permission filtering for indexed SharePoint content returns missing or unexpected results, or if a permission-filtered query fails.

Prerequisites

  • An index populated by the SharePoint in Microsoft 365 indexer with ACL ingestion configured.
  • Query-time permission filtering configured as described in Query-time ACL and RBAC enforcement.
  • REST API version 2026-10-01 for SharePoint permission filtering.
  • Access to the index definition, generated or explicit indexer status, and the SharePoint permissions for a test user.
  • Search Index Data Contributor or equivalent elevated-read permission if you need to compare filtered and unfiltered results.

Follow the troubleshooting decision tree

Complete these checks in order. Stop when the observed result identifies the configuration or permission that needs correction.

1. Confirm the failure occurs at query time

This article covers permission filtering after SharePoint content and ACL metadata are indexed.

Continue here only when indexed permission metadata exists and the symptom occurs when you query it.

2. Identify the three identities

Record which identity fills each role. Don't substitute one identifier for another.

Identity Purpose Where to verify it
Querying user The delegated user token in x-ms-query-source-authorization determines which protected documents the user can retrieve. Your application authentication flow and the query request.
SharePoint connector app registration The sharePointConnectorAppRegistration on the index lets Foundry IQ (Azure AI Search) resolve the querying user's SharePoint site group memberships. The index definition and the app registration described in Configure SharePoint groups support.
Foundry IQ request identity The Microsoft Entra bearer token in the Authorization header, or the API key in the api-key header, authenticates the request to the Foundry IQ service. The identity must have permission to query the index. Your query client and Foundry IQ data plane role assignment.

3. Check the permission-filter configuration

Compare the index, indexer, and generated objects against their owner articles.

  1. Confirm the index has permissionFilterOption set to enabled.
  2. Confirm UserIds and GroupIds have the correct permissionFilter values.
  3. For SharePoint site groups, confirm the index has sharePointConnectorAppRegistration and a SharePointSiteUrl field with sharepointSiteUrl: true.
  4. Confirm every indexed document or chunk carries the applicable permission fields. If the skillset uses index projections, verify the ACL fields are in indexProjections.selectors[].mappings.
  5. Confirm the index has the required metadata_spo_item_path field and that projected chunks retain the source path. An asset/item ID or site URL doesn't replace it.

If any value is absent, return to Configure your Foundry IQ service for ACL ingestion and query-time enforcement.

For metadata and lifecycle symptoms, narrow the check to the affected source item and its indexed documents or chunks.

Symptom Focused check and next action
Source path is missing or doesn't match the item Compare metadata_spo_item_path with the source metadata. Check the required named field and each chunk's /document/metadata_spo_item_path projection. An item key, web URL, or site URL isn't a replacement. Correct the mapping and reprocess affected items.
Native site-group access differs across sites Compare each item's metadata_spo_site_url with the field marked sharepointSiteUrl: true. Check that projections preserve the originating site rather than a constant site URL. Review connector consent and selected-site grants for each site.
List, page, or mixed items are missing or have unexpected keys For directly configured indexers using allSiteLists, allSitePages, or allSiteContent, check the metadata_spo_site_asset_item_id key mapping and encoding. Use the connector's key instructions, not a path or site URL as a substitute.
A parent looks correct but chunks differ Inspect the generated or explicit skillset's projections and actual child records. Verify content, source path, ACLs, and applicable site context on each chunk. Don't add manual mappings for projection-generated keys or parent identity.
Old records remain after refresh, move, rename, or deletion Check source selection paths, indexer warnings and failures, and current versus earlier document and chunk keys. Distinguish permission refresh from content and lifecycle processing; verify obsolete records separately.

Use indexer diagnostics for missing, null, malformed, or unresolvable paths; don't infer a specific error or authorization result from the field value alone. For an indexed knowledge source, also complete its generated-resource checks.

4. Check the query token safely

Don't log, paste into a support request, or share a full access token. Decode only the token payload locally, and sanitize identifiers before you capture diagnostic output.

  1. Confirm the request includes x-ms-query-source-authorization with a current delegated token for the test user.
  2. Decode the payload locally and confirm the oid identifies the intended test user. Record a sanitized value such as <test-user-object-id>.
  3. Reauthenticate the user and retry if the token is missing or expired.

If the user token is omitted, permission-protected content isn't returned. The Authorization header alone doesn't replace x-ms-query-source-authorization.

5. Check Microsoft Entra permissions

  1. Confirm the indexed UserIds or GroupIds contain the expected Microsoft Entra object ID. Use an elevated-read query only for this diagnostic comparison.
  2. Confirm the test user has a direct assignment or reaches the assigned group within the supported five nested levels.
  3. If the Microsoft Entra group is nested within a SharePoint group, check the nesting depth and SharePoint group configuration. A path deeper than five levels doesn't grant access through that path; a separate supported grant can still apply.

For the exact support boundary, see Supported group relationships.

6. Check SharePoint site group permissions

Complete this step when the document ACL depends on an Owners, Members, Visitors, or custom SharePoint site group.

  1. Use an elevated-read query to confirm GroupIds contains the expected spg:-prefixed group ID and SharePointSiteUrl identifies the source site.
  2. Confirm the test user is a direct member of that SharePoint group or reaches it through a supported Microsoft Entra group nesting path.
  3. Confirm the index's sharePointConnectorAppRegistration uses the identifiers and permissions required by SharePoint groups support.

If the indexed fields are empty or stale, fix ingestion or synchronize the SharePoint permissions before you retest the query.

For missing nested-group results, also review the site-level 10,000-principal limit. It's separate from nesting depth and the test user's group count. Reindexing alone doesn't resolve this query-time threshold.

Membership results are cached, so a change to site group configuration might not appear in the next query. Compare a supported direct assignment with the nested-group path to isolate the issue. If it persists, collect the request correlation details for Support rather than repeatedly reindexing. Keep permission filtering enabled while investigating.

7. Check the query request

  1. Use REST API version 2026-10-01 for SharePoint permission filters.
  2. Confirm Authorization authenticates a principal that can query the index.
  3. Confirm x-ms-query-source-authorization contains the delegated test-user token.
  4. Retry the same query without unrelated filters or ranking changes so you can isolate permission behavior.

Use the general query example as the request-shape owner. Don't include full tokens in saved requests or logs.

If authorization can't be evaluated, handle the error without returning protected content or retrying with elevated or unfiltered access. See Handle authorization and update failures for application and Push pipeline responsibilities.

8. Compare expected and actual results

  1. Choose one document the test user can access and one document the user can't access in SharePoint.
  2. Run the permission-filtered query as the test user and record only document keys or other nonsecret identifiers.
  3. Run an elevated-read query and compare the stored UserIds, GroupIds, and SharePointSiteUrl values with the source permissions.
  4. If elevated read returns the expected document but the user query doesn't, check the user token, stored ACL values and freshness, and group resolution. If elevated read also misses it, check content ingestion, source selection, and indexed keys.

Compare supported explicit user and group assignments, including inherited assignments, rather than organization-wide sharing links. Organization-wide links and sharing-link expiration enforcement aren't supported. Expiring a link doesn't revoke an independent explicit grant. Opening a file in SharePoint is a separate access check from retrieving its indexed content.

After a source permission change, check the synchronization scenario table and indexer execution status. A query doesn't start the indexer, and a requested run doesn't indicate completed ACL processing.

  1. In SharePoint, check whether the affected item inherits permissions or has unique permissions. For example, a file that inherits a folder's permissions follows that folder's assignments; a file with unique permissions retains its own assignments.
  2. Confirm the relevant indexer run completed, then compare the indexed ACLs with the item's source assignments. For chunked content, check the affected chunks too.
  3. Follow the scenario table to choose normal incremental processing, permissions resync, or source-item reprocessing. If results still differ, capture the request correlation details.

Elevated read is for investigation. Don't use it to return unrestricted results to end users.

9. Capture request correlation details

If the query still fails, capture the API version, UTC timestamp, sanitized request body, HTTP status, response headers, and any request or correlation ID returned by the service. Include the index name and whether the same document appears under elevated read.

Remove access tokens, API keys, secrets, user names, and tenant-specific URLs before you share diagnostics with Microsoft Support.