task: PATCH custom_fields returns 1470403 with DPoP user token, works with Bearer
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 22/100
Hướng nghiên cứu
The bug sits in the DPoP token path of the Go CLI when calling the Lark task v2 PATCH endpoint with update_fields custom_fields. Start from the repro: config set dpop preferred, then task tasks patch with custom_fields. Compare the request against a Bearer run to find where the permission check diverges. Done means a DPoP-bound user token can update a custom field on an existing task and the Bearer path is unchanged.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
With a DPoP-bound user access token, updating a custom field value on an existing task (PATCH /open-apis/task/v2/tasks/:task_guid with update_fields: ["custom_fields"]) always fails with 1470403 ("user lacks permission for the requested resource"). The same request succeeds after re-authorizing with lark-cli config set dpop disabled (Bearer token). Other operations work fine with the DPoP token, including setting custom field values at task creation.
Environment
- lark-cli 1.0.98 (npm), Windows 11, brand
lark - DPoP mode
preferred, key providerwindows-platform-ksp - User identity (
--as user), the user is the owner of the tasklist and creator/assignee of the task
Steps to reproduce
lark-cli config set dpop preferred, thenlark-cli auth login --recommend(token type: DPoP; scopes includetask:task:writeandtask:custom_field:write).- Create a tasklist, then a single-select or text custom field on it (
task custom_fields create,resource_type: tasklist). - Create a task in that tasklist.
- Update the field value:
lark-cli task tasks patch --as user --params '{"task_guid":"<TASK_GUID>"}' \
--data '{"task":{"custom_fields":[{"guid":"<FIELD_GUID>","text_value":"x"}]},"update_fields":["custom_fields"]}'
Actual result
"code": 1470403,
"message": "user lacks permission for the requested resource"
Expected result
The value is updated, as it is in the Lark client by the same user, and as it is with a Bearer token.
What we checked (all with the same user and app)
| Token | Scopes | Operation | Result |
|---|---|---|---|
| DPoP | task, contact, wiki, docs, drive, base, sheets, calendar, vc | PATCH custom_fields on existing task | 1470403 |
| DPoP | --recommend (all) |
PATCH custom_fields on existing task | 1470403 |
| Bearer | --recommend (all) |
PATCH custom_fields on existing task | OK |
| DPoP | any of the above | PATCH summary on the same task | OK |
| DPoP | any of the above | PATCH summary + custom_fields together | 1470403 |
| DPoP | any of the above | create task with custom_fields values |
OK |
| DPoP | any of the above | raw lark-cli api PATCH ... |
1470403 |
- Single-select and text fields behave the same.
- Adding the user explicitly as
editormember, or adding the app as a tasklist member, does not help. - The same user can set the value in the Lark client without problems.
So the field permission check on task update seems not to accept DPoP-bound user tokens, while task edit permission and field writes on create do.
Workaround
lark-cli config set dpop disabled and re-authorize (Bearer token).
- Ngôn ngữ chính
- Go
- Star
- 18.2k
- Fork
- 1.4k
- Merge trung bình
- 1 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 18
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của larksuite/cli
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
domain/im
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug domain/doc
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
mail: all-ASCII draft bodies are hard-wrapped every 998 bytes, inserting newlines inside words and tagsCó thể đã có người làm @linye157 đã nhận 26 ngày trước. Đang mởdomain/mail
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 1 ngày
-
auth: a 429 from the Token Endpoint during refresh deletes a still-valid loginCó thể đã có người làm @linye157 đã nhận 26 ngày trước. Đang mởbug domain/auth domain/im
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
larksuite/cli#2869 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của larksuite/cli
Issue tương tự
-
Add Alice&BotĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
slavakurilyak/awesome-ai-agents#1048 ·
-
【文章自荐】本地 LLM 实测:GPU 推理速度与测量条件Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
eryajf/learning-weekly#235 ·
-
test_archive_is_downloaded_after_logout_login doesn't wait for the storage client after loginĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
list_issues and search_issues: inconsistent `fields` allow-lists (`html_url` rejected by list)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
github/github-mcp-server#3960 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày