fix(keycloak): KC 26 org member body is the bare user id; set org tenant_id #27

Merged
sharang merged 2 commits from fix/kc26-org-member into main 2026-09-12 09:39:28 +00:00
Owner

Found by the live M-MIG-5 check (POST /v1/tenants with admin_email on staging): org + user were created but the member call failed with 400 User does not exist — Keycloak 26 takes the bare user id (JSON string) as the body of POST /organizations/{id}/members. Also PUTs the tenant_id org attribute after create, which KC 26 ignores on create. Stub test enforces both.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB

Found by the live M-MIG-5 check (`POST /v1/tenants` with `admin_email` on staging): org + user were created but the member call failed with `400 User does not exist` — Keycloak 26 takes the bare user id (JSON string) as the body of `POST /organizations/{id}/members`. Also PUTs the `tenant_id` org attribute after create, which KC 26 ignores on create. Stub test enforces both. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
sharang added 1 commit 2026-09-12 09:13:31 +00:00
fix(keycloak): KC 26 org member body is the bare user id; set org tenant_id
ci / shared (pull_request) Successful in 11s
ci / test (pull_request) Failing after 4m53s
ci / image (pull_request) Skipped
b1156f259c
Live stage run: CreateOrgAndInvite created the org and the user but
POST /organizations/{id}/members with {"id": …} answered 400 "User does
not exist" — Keycloak 26 expects the id as a JSON string. Also writes
the tenant_id attribute with a PUT after create (ignored on create).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
sharang added 1 commit 2026-09-12 09:13:43 +00:00
chore: gofmt
ci / shared (pull_request) Successful in 13s
ci / test (pull_request) Successful in 22m15s
ci / image (pull_request) Skipped
43e0fec9ed
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
sharang merged commit 8f5c9ba0b9 into main 2026-09-12 09:39:28 +00:00
sharang deleted branch fix/kc26-org-member 2026-09-12 09:39:28 +00:00
Sign in to join this conversation.