Regression in Azure AI Search Elevated Read Access: App-Only Tokens No Longer Supported with x-ms-enable-elevated-read Header

Abierto
#49,507 3 comentarios 1 reacción 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
18/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
azure, python

Línea de trabajo

The failing call is search_client.search(...) with a headers={"x-ms-enable-elevated-read": "true"} argument, using a service principal credential; the service error is quoted in the issue body. Start by reproducing the call with an app-only credential and checking how the SDK's search client passes custom headers and credentials. Done means the team has decided whether the SDK should change or the docs should state that elevated read requires a user token, and the reporter's workaround is confirmed.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Client customer-reported needs-team-attention question Search Service Attention
search_results = search_client.search(
    search_text="",
    filter=f"artefact_id eq '{artefact_id.lower()}'",
    select=["id"],
    top=100,
    headers={"x-ms-enable-elevated-read": "true"},
)

We are experiencing a regression/change in behavior when using Azure AI Search elevated read access.

Previously, our application was able to successfully query documents from an Azure AI Search index using the x-ms-enable-elevated-read header while authenticating through a service principal (app-only authentication). This capability was being used to retrieve existing indexed documents, including records that contain user permission restrictions, so that stale entries could be identified and deleted before re-ingestion.

ERROR : azure.core.exceptions.HttpResponseError:
Header 'x-ms-enable-elevated-read' requires an AAD user access token.
App-only tokens are not supported.

Code:
Message: Header 'x-ms-enable-elevated-read' requires an AAD user access token.
App-only tokens are not supported.

Due to this behavior change:

1] Existing documents with restricted permissions cannot be retrieved using elevated read access.
2] The ingestion process cannot reliably identify and delete previously indexed documents.
3] Duplicate or stale documents may remain in the index.
4] Automated synchronization between source repositories and Azure AI Search is impacted.

Lenguaje dominante
Python
Estrellas
5.6k
Forks
3.4k
Merge medio
1 d 22 h
PR fusionados (30 d)
189

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Azure/azure-sdk-for-python

Todos los issues de Azure/azure-sdk-for-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.