Skip to content

contact +get-user and +search-user do not return email field even with contact:user.email:readonly scope #562

Description

@zhyuzhyu

Bug Description

contact +get-user and contact +search-user shortcuts do not return the email field, even when the contact:user.email:readonly scope has been granted. However, calling the raw API directly via lark-cli api does return the email field correctly.

Steps to Reproduce

  1. Grant the contact:user.email:readonly scope:

    lark-cli auth login --scope "contact:user.email:readonly"
  2. Use +get-user shortcut — email missing:

    lark-cli contact +get-user --user-id "ou_xxxx"

    Response only contains name, user_id, i18n_name — no email field.

  3. Use +search-user shortcut — email missing:

    lark-cli contact +search-user --query "张三" --format json

    Response contains name, open_id, department_ids, avatar — no email field.

  4. Call raw API directly — email present ✅:

    lark-cli api GET "/open-apis/contact/v3/users/ou_xxxx?user_id_type=open_id"

    Response correctly includes "email": "xxx@company.com".

Expected Behavior

When contact:user.email:readonly scope is granted, both +get-user and +search-user should include the email (and enterprise_email) field in their output, consistent with the raw API response.

Environment

  • lark-cli version: 1.0.13
  • OS: macOS (Darwin, arm64)

Workaround

Use lark-cli api GET to call the raw contact API directly, or use lark-cli mail multi_entity search which does return the email field.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdomain/authAuthentication subsystemdomain/mailPR touches the mail domain

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions