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

Đang mở
#49,507 3 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
18/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
azure, python
Lĩnh vực
authentication, search

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
5.6k
Fork
3.4k
Merge trung bình
1 ngày 22 giờ
Pull request đã merge (30 ngày)
189

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Azure/azure-sdk-for-python

Tất cả issue của Azure/azure-sdk-for-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.