larksuite / larksuite/cli

[Auth] --domain all omits base:field_group:create

Open
#2,158 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

domain/auth domain/base
Dominant language
Go
Stars
17.3k
Forks
1.4k
Avg merge
2d 4h
Merged PRs (30d)
105

Description

Summary

On lark-cli 1.0.81, auth login --domain all does not request base:field_group:create, even though the scope exists in the CLI registry and is required by the official Base Field Groups API. A second OAuth flow requesting the exact scope is required.

Environment

  • lark-cli: 1.0.81
  • Brand: Lark
  • Identity: user

Steps to reproduce

  1. Ensure the app supports/enables base:field_group:create.
  2. Start a full-domain device flow:
lark-cli auth login --domain all --no-wait --json
  1. Complete authorization and finish the flow with --device-code.
  2. Check the Field Group scope:
lark-cli auth check --scope base:field_group:create

Actual behavior

The full-domain authorization result excludes base:field_group:create, and the scope check reports it as missing. The scope is absent from the OAuth requested list.

Running a second, explicit flow works:

lark-cli auth login --scope "base:field_group:create" --no-wait --json

After completing that flow, the result reports:

{
  "newly_granted": ["base:field_group:create"],
  "missing": []
}

and auth check returns ok: true.

Expected behavior

--domain all should include every supported scope assigned to a CLI domain, including base:field_group:create, or the CLI should explicitly document why this scope is excluded and direct users to request it separately.

Additional context

The repository registry contains base:field_group:create in internal/registry/scope_priorities.json with recommend: true, which makes its omission from --domain all especially surprising.

Related Field Groups shortcut request: #2157

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with internal/registry/scope_priorities.json and trace how the auth login --domain all command assembles its OAuth requested scopes. Reproduce with the listed auth login and auth check commands, then verify that the full-domain result includes base:field_group:create or that the exclusion is explicitly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
authentication, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.