---
title: "查询平台用户（List platform users）"
method: GET
path: "/system/admin/users"
tags: ["System Admin"]
---

# 查询平台用户（List platform users）

`GET /system/admin/users`

## Request

- Base URL: `/api/v1` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/v1/system/admin/users`
- Auth: none declared

Retrieve a paginated list of every user across tenants (SystemAdmin only).
Supports `offset` (default 0) and `limit` (default 50, max 200).
Password/hashes are never serialised — only the redacted UserInfo shape.

## Query parameters

- `offset` integer
- `limit` integer

## Response `200`

Users retrieved successfully

- InternalHandlerListAllUsersResponse
  - `has_more` boolean
  - `limit` integer
  - `offset` integer
  - `users` GithubComTencentWeKnoraInternalTypesUserInfo[]
    - `avatar` string
    - `can_access_all_tenants` boolean
    - `created_at` string
    - `email` string
    - `id` string
    - `is_active` boolean
    - `is_system_admin` boolean
    - `preferences` GithubComTencentWeKnoraInternalTypesUserPreferences
      - `browser_search_instructions` string: BrowserSearchInstructions customizes browser search for this user. Nil/empty uses the platform default.
      - `gallery` GithubComTencentWeKnoraInternalTypesGalleryUserPrefs
        - `mode` string: Mode is "all" (every search-eligible field active) or "custom" (per-field Status governs). Empty = "all".
        - `status` object: Status maps a namespaced attribute id ("builtin:caption") to "on"/"off". Only consulted in custom mode; an unrecorded field is off. Source-declared on/off does not exist — activation is always the user's own record.
      - `last_active_tenant_id` integer: LastActiveTenantID remembers the last workspace the user actively switched into, so a fresh login (new device, cleared browser, new refresh token) lands them back in that workspace instead of always bouncing to their home workspace. Written by the SPA's preferences PUT and by service-level SwitchTenant (including when switching home, which stores the home ID). Login / RefreshToken validate that the workspace still exists and the user still has an active membership (or CanAccessAllTenants) before honouring this preference; an invalid pointer is best-effort cleared and the user falls back to home. Refresh JWT claims have no tenant_id, so RefreshToken re-resolves from this field. nil = no preference (use user.TenantID, i.e. home) *0 = "clear preference" sentinel for the partial-update endpoint (UpdateUserPreferences turns this into nil). Otherwise treat a stored *0 the same as nil. *N = preferred workspace id.
      - `oidc_only_login` boolean: OidcOnlyLogin is set server-side when an account is auto-provisioned via OIDC with a random password the user never received. The profile UI hides self-service password rotation until the user sets a known password via ChangePassword (which clears this flag).
    - `tenant_id` integer
    - `updated_at` string
    - `username` string

## Other responses

- `403`: Forbidden: not a system admin

## Changes

- **2026-10-14** `a1c41ab134cc`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/tencentblueking/apis/weknora-api/changes/system/admin/users/get.md)

---

[API](https://skmtc.dev/tencentblueking/apis/weknora-api.md) - [All operations](https://skmtc.dev/tencentblueking/apis/weknora-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tencentblueking/apis/weknora-api/revisions/685d1f9fce30?raw)
