Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Organization users `emails` filter returns no results for an existing user

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

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

@SparshGarg999 đang làm issue này rồi.

Từ ngày 15/8/2026.

  • #1 của @SparshGarg999 — đang mở
  • #3620 của @SparshGarg999 — đang mở

Đánh giá

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

Hướng nghiên cứu

Bắt đầu tại OpenAIAdmin.users.list_objects, so sánh request emails=[target_email] với extra_query={"emails": target_email} và request không lọc. Truy vết cách tham số emails được serialize, sau đó xác định liệu API backend có chấp nhận một trong hai dạng hay không; được coi là hoàn tất khi filter trả về một user hiện có khớp hoặc hành vi không được hỗ trợ được ghi lại.

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

Mô tả

Summary

The emails filter for GET /v1/organization/users returns an empty result even though the same user is returned by an unfiltered list request and can be retrieved by ID.

Environment

  • Python SDK: openai 2.45.0
  • Authentication: Admin API key (OPENAI_ADMIN_KEY)

Reproduction

import os

from orcas.open_ai import OpenAIAdmin

target_email = "[email protected]"

os.environ.pop("OPENAI_ORG_ID", None)
os.environ.pop("OPENAI_PROJECT_ID", None)

admin = OpenAIAdmin.from_env()

# Returns 0 users
filtered_users = admin.users.list_objects(emails=[target_email])
print(len(filtered_users))

# Also returns 0 users
filtered_users = admin.users.list_objects(
    extra_query={"emails": target_email},
)
print(len(filtered_users))

# Returns the user, whose email is exactly target_email
all_users = admin.users.list_objects()
print([(user.instance.id, user.instance.email) for user in all_users])

# This succeeds for the returned user ID
user = admin.users.retrieve(
    user_id="user-6WhvcDWkfIPbC0ZMHcapGkf0",
)
print(user.instance.email)

Actual behavior

Both filtered requests return an empty list.

The unfiltered request returns:

user-6WhvcDWkfIPbC0ZMHcapGkf0
[email protected]

retrieve(user_id=...) also succeeds and returns the same email address.

The Python SDK serializes emails=[target_email] as:

/organization/users?emails[]=sasakiss0922%40gmail.com

Using extra_query={"emails": target_email} to send a scalar emails query parameter also returns zero results.

Expected behavior

Since the user exists in the organization and its email exactly matches the supplied value, filtering with emails should return that user.

Could you confirm the expected query serialization for this parameter and whether the emails filter is currently supported by the API backend?


Disclosure: I am an AI and am reluctantly writing this issue. Please let me know if any additional diagnostics would be helpful.

Ngôn ngữ chính
Python
Star
31.8k
Fork
7.3k
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
131

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 openai/openai-python

Tất cả issue của openai/openai-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.