Broad or batch queries can expose more colleague data than the task requires
Source references: 6`+search-user` supports batch enrichment of up to 100 open_ids and filter-only enumeration such as all departed colleagues the user has chatted with. Results can include personal and enterprise email, department, chat ID, signature, and contact-recency hints. Although access is limited by the current account's visibility, the Skill does not require requesting or displaying only fields necessary for the immediate task.
Full results shown in a shared conversation, screen, or log could disclose colleagues' identities, contact details, organizational relationships, departure status, and interaction history to observers or downstream systems.
The source supports this risk. The Skill permits lookup of up to 100 open_ids and provides a filter-only command that enumerates contacts who were previously chatted with and have left the organization. Returned data can include email addresses, department, P2P chat ID, signature, and recent-contact hints. These operations fit the contact-lookup purpose and are limited by the active identity’s visibility, but no instruction requires minimizing queried or displayed fields. Broad filters or batch enrichment could therefore expose unnecessary coworker data to the user or later context. Users can ask for field minimization, no keyword-free enumeration, and confirmation before batch queries.
`--query` / `--queries` / `--user-ids` / bool filter 至少传一个。bool filter 显式传 `=false` 会报错——不传等于不过滤。| Flag | 作用 ||---|---|| `--query <text>` | 关键词(姓名 / 邮箱 / 手机号),≤ 50 rune || `--queries <csv>` | 多个关键词并行搜,**最多 20 条**;与 `--query` / `--user-ids` 互斥;输出新 shape(见下) || `--user-ids <csv>` | open_id 列表,≤ 100;支持 `me` 表示自己;与 `--query` 同传时把搜索范围限定在该集合 || `--has-chatted` | 仅搜聊过天的 || `--has-enterprise-email` | 仅搜有企业邮箱的 || `--exclude-external-users` | 仅搜同租户(排除外部联系人) || `--left-organization` | 仅搜已离职的 || `--lang <locale>` | 覆盖 `localized_name` 的语种(如 `zh_cn` / `en_us` / `ja_jp`) |Show 5 other places
# filter-only 枚举:列出所有"聊过天的离职同事"(无关键词)lark-cli contact +search-user --has-chatted --left-organization```| `localized_name` | string | 按 `--lang` / brand 选出的展示名 | 始终非空(兜底为 open_id) || `email` | string | 个人邮箱 | 可能为空 || `enterprise_email` | string | 企业邮箱 | 可能为空 || `is_activated` | bool | 是否已激活飞书账号(未激活也可投递消息,但用户可能看不到) | 可能 false || `is_cross_tenant` | bool | 是否跨租户用户(同公司=false,外部联系人=true) | — || `p2p_chat_id` | string | 与当前用户的 P2P 会话 ID(`oc_...`);空表示从未私聊过。可作为接受 `--chat-id` 的 IM 命令的输入 | 可能为空 || `has_chatted` | bool | `p2p_chat_id != ""` 的派生字段 | — || `department` | string | 部门路径,服务端可能用 `-` 拼层级,层级数不固定。**按可子串匹配的字符串处理** | 可能为空 || `signature` | string (optional) | 用户个性签名;空时字段不出现 | 可能不出现 || `chat_recency_hint` | string | 最近联系的提示文案,仅供展示 | 可能为空 || `match_segments` | string[] | 关键词命中的字符串片段,用于高亮展示;无命中则为空数组 | — |批量查同事的个人状态 / 个性签名(先用 schema 看参数)。```bashlark-cli schema contact.user_profiles.batch_querylark-cli contact user_profiles batch_query \ --params '{"user_id_type":"open_id"}' \ --data '{"user_ids":["ou_xxx","ou_yyy"],"query_option":{"include_personal_status":true,"include_description":true}}' \ --as user```# 批量回填:已知一组 open_id,取姓名 / 邮箱 / 部门lark-cli contact +search-user --user-ids "ou_a,ou_b,ou_c" --format json# 多 filter 组合:同租户的、有企业邮箱的「王」姓员工lark-cli contact +search-user --query "王" --exclude-external-users --has-enterprise-email# filter-only 枚举:列出所有"聊过天的离职同事"(无关键词)lark-cli contact +search-user --has-chatted --left-organization```- **41050 / Permission denied** 受当前身份的可见范围限制(三条命令都可能遇到)。细节见 [`lark-shared`](../lark-shared/SKILL.md)。- **跨租户用户**(`is_cross_tenant=true`)多数业务字段为空字符串,这是飞书可见性规则,下游做空值兜底。