I've been stuck on this for a few days and I'm fairly sure I've exhausted the config side, so hoping someone from the product team can take a look.
I'm using the preview SharePoint site-group enforcement at query time - sharePointConnectorAppRegistration on the index plus x-ms-query-source-authorization on the query, API version 2026-05-01-preview. Whenever a query actually triggers SharePoint group resolution, I get:
HTTP 400 Failed to authenticate with SharePoint using managed identity.No matching identity found for federated credential ID '<fic-id>'.Confirm that the federated credential exists on the Entra application registration and is linked to a system-assigned or user-assigned managed identity on this search service.
The frustrating part is that the indexer authenticates to SharePoint through the exact same managed identity → connector app federation and runs to success — it pulls content and the spg: ACLs without any issue. So the trust itself clearly works. It only breaks on the query-time path.
The <fic-id> in the error is exactly the FIC referenced by the index's sharePointConnectorAppRegistration.
What I can prove is working (this is the frustrating part):
- Ingestion works. The SharePoint indexer runs to success and the managed-identity sign-in logs show a successful AAD Token Exchange — so the MI → connector-app federation is functional.
- ACLs are correctly ingested onto every chunk. An elevated-read query (
x-ms-enable-elevated-read: true) returns documents where each chunk has spg:-prefixed values in GroupIds (e.g. spg:https://<tenant>.sharepoint.com/sites/<site>:52), a populated SharePointSiteUrl, and UserIds. So the data and index projections are right.
- The permission filter works. A query with no query-source header returns HTTP 200 with zero results (everything trimmed, as expected with no identity supplied); elevated read returns the documents. So trimming is active and correct.
What fails: only the query-time SharePoint site-group resolution. The moment a valid same-tenant end-user token (audience https://search.azure.com) is passed via x-ms-query-source-authorization, I get the 400 above. The message is the search service authenticating to SharePoint via the MI/FIC — before the caller's membership is evaluated — so it's not user-specific and reproduces with any valid same-tenant token.
Configuration (matches the docs):
- Search service on Basic, single tenant, no Conditional Access.
- Index:
permissionFilterOption: "enabled", UserIds/GroupIds permission-filter fields, SharePointSiteUrl field with sharepointSiteUrl: true (projected onto every chunk via index projections; two-index parent + chunk pattern).
-
sharePointConnectorAppRegistration = { applicationId: <connector app client ID>, federatedCredentialId: <FIC object ID>, tenantId: <SharePoint tenant ID> }.
- Connector app: SharePoint
User.Read.All + Sites.Selected, Graph Files.Read.All + Sites.Selected, admin-consented. Explicit per-site grant on the target site at FullControl (via Grant-PnPEntraIDAppSitePermission) — the same grant the indexer uses successfully to ingest content and spg: ACLs.
- Federated credential: issuer
.../{tenant}/v2.0, subject = search service MI principal ID, audience api://AzureADTokenExchange.
Already ruled out:
-
federatedCredentialId is the FIC's object ID (not app object ID, app client ID, MI principal ID, or FIC display name) — verified against Graph.
- Reproduced with both system-assigned and user-assigned MI (indexer confirmed running through the UAMI); no change.
- Waited >10 hours, plus disable/re-enable of the identity with subject updated; no change.
- No Conditional Access on the tenant.
- Per-site access is not the issue - the app holds a FullControl grant on the target site, and the indexer proves that grant works by ingesting content and
spg: ACLs through it.The <fic-id> in the error is exactly the FIC referenced by the index's sharePointConnectorAppRegistration. What I can prove is working (this is the frustrating part):
- Ingestion works. The SharePoint indexer runs to success and the managed-identity sign-in logs show a successful AAD Token Exchange — so the MI → connector-app federation is functional.
- ACLs are correctly ingested onto every chunk. An elevated-read query (
x-ms-enable-elevated-read: true) returns documents where each chunk has spg:-prefixed values in GroupIds (e.g. spg:https://<tenant>.sharepoint.com/sites/<site>:52), a populated SharePointSiteUrl, and UserIds. So the data and index projections are right.
- The permission filter works. A query with no query-source header returns HTTP 200 with zero results (everything trimmed, as expected with no identity supplied); elevated read returns the documents. So trimming is active and correct.
What fails: only the query-time SharePoint site-group resolution. The moment a valid same-tenant end-user token (audience https://search.azure.com) is passed via x-ms-query-source-authorization, I get the 400 above. The message is the search service authenticating to SharePoint via the MI/FIC — before the caller's membership is evaluated — so it's not user-specific and reproduces with any valid same-tenant token. Configuration (matches the docs):
- Search service on Basic, single tenant, no Conditional Access.
- Index:
permissionFilterOption: "enabled", UserIds/GroupIds permission-filter fields, SharePointSiteUrl field with sharepointSiteUrl: true (projected onto every chunk via index projections; two-index parent + chunk pattern).
-
sharePointConnectorAppRegistration = { applicationId: <connector app client ID>, federatedCredentialId: <FIC object ID>, tenantId: <SharePoint tenant ID> }.
- Connector app: SharePoint
User.Read.All + Sites.Selected, Graph Files.Read.All + Sites.Selected, admin-consented. Explicit per-site grant on the target site at FullControl (via Grant-PnPEntraIDAppSitePermission) — the same grant the indexer uses successfully to ingest content and spg: ACLs.
- Federated credential: issuer
.../{tenant}/v2.0, subject = search service MI principal ID, audience api://AzureADTokenExchange.
Is this a known defect in the 2026-05-01-preview query-time SharePoint site-group resolution path or is there an additional binding required specifically for the query-time path — beyond the FullControl site grant and the managed-identity → connector-app federation that ingestion already uses successfully?
