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

Aperta
#49,507 3 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
18/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
azure, python

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
5.6k
Fork
3.4k
Merge medio
1g 22h
PR unite (30g)
189

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Azure/azure-sdk-for-python

Tutte le issue di Azure/azure-sdk-for-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.