calendar: 190006 "wrong unit for app tenant" on US-unit Lark tenant
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
The report names calendar commands and the raw /open-apis/calendar/v4/calendars request, but no source files or tests. Start by tracing how the lark brand selects the Open API host for calendar calls and compare it with the working Docs or Drive requests. Done means calendar requests on a US-unit tenant succeed for both user and bot identities, with coverage for the host selection behavior.
Written by the indexing model from the issue text.
Description
Related: #2835 (same error on a Japan-region tenant). Filing separately because this happens on a US-unit tenant, so it doesn't look region-specific to Japan.
Summary
On a Lark (international) tenant hosted in the US unit (*.usttp.larksuite.com), every calendar call fails with error 190006 "wrong unit for app tenant", for both user and bot identities. The same app and token work for Docs, Drive and IM.
Environment
- lark-cli 1.0.98 (npm), Windows 11, Git Bash
- App created with
--brand lark;config show→"brand": "lark" - User identity: token valid, DPoP (
dpopMode: preferred) - Bot identity: ready
- User token scopes include all calendar scopes:
calendar:calendar:read,calendar:calendar.event:create,calendar:calendar.event:read,calendar:calendar.event:update,calendar:calendar.free_busy:read, etc.
Steps to reproduce
| Command | Identity | Result |
|---|---|---|
lark-cli calendar +freebusy --start 2026-10-29 |
user | 190006 |
lark-cli calendar +freebusy --start 2026-10-29 --user-id <other user> |
user | 190006 |
lark-cli calendar +agenda --start 2026-10-29 --end 2026-10-29 |
user | 190006 |
lark-cli calendar calendars primary |
user | 190006 |
lark-cli api GET /open-apis/calendar/v4/calendars |
user | 190006 |
lark-cli calendar +freebusy --start 2026-10-29 --user-id <self> |
bot | 190006 |
Actual result
{"ok": false, "error": {"type": "api", "subtype": "unknown", "code": 190006, "message": "wrong unit for app tenant"}}
Log IDs:
20261029133455A4483A5B2F39E8A14B8F(+freebusy, user)20261029133504AB0C4CA237348F9E9BFE(calendars primary, user)20261029133523241F3E9E8107699E4661(+freebusy, bot)20261029133614649D9ACC7EFA3F9D628F(raw GET /open-apis/calendar/v4/calendars, user)
Expected result
Calendar data is returned, the same way other domains work on this tenant.
What works on the same tenant
docs +search, docs +fetch, Drive comment listing, IM. Credentials and scopes appear correct.
Notes
- The bot (tenant token) fails the same way as the DPoP user token, so DPoP doesn't look like the cause.
- The
larkbrand seems to send all services tohttps://open.larksuite.com, andconfig setonly supportsdpop. Calendar may need a unit-specific Open API host for tenants outside the default unit. - Request: a config option to set the Open API host (globally or per service), or auto-detect the tenant's unit.
- Dominant language
- Go
- Stars
- 18.2k
- Forks
- 1.4k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 18
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from larksuite/cli
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
domain/im
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
bug domain/doc
Difficulty 1/5 Under an hour Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
mail: all-ASCII draft bodies are hard-wrapped every 998 bytes, inserting newlines inside words and tagsPossibly taken @linye157 claimed this 26 days ago. Opendomain/mail
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
auth: a 429 from the Token Endpoint during refresh deletes a still-valid loginPossibly taken @linye157 claimed this 26 days ago. Openbug domain/auth domain/im
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
larksuite/cli#2869 · 5 comments ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
github/github-mcp-server#3960 ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
JuliusBrussee/caveman#1594 ·
Maintainers usually reply within 1 day
-
C-bug O-community X-blathers-triaged
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
cockroachdb/cockroach#176264 · 1 comment ·
-
security trivy
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
kubefleet-dev/kubefleet#1068 ·
Maintainers usually reply within 3 days