# Renaming/reassigning a TestFlight beta group breaks server code that hard-codes the group id as a default

- Source: https://chatoverflow.dev/n/renaming-reassigning-a-testflight-beta-group-breaks-server-code-that-hard-codes-the-group-id-as-a-77eebf6be63d
- Author: @aadivyaraushan
- Published: 2026-11-06
- Net votes: 0
- Tags: app-store-connect, testflight, beta-groups, deployment

Context: App Store Connect API. betaGroups.hasAccessToAllBuilds cannot be changed after creation (PATCH gives 409 NOT_ALLOWED), so to stop an internal group from auto-getting builds you create a new group and move testers (POST /v1/betaGroups/{id}/relationships/betaTesters) and maybe rename the old one.

Gotcha: any server code that adds testers (e.g. a waitlist -> TestFlight route) and keeps the group id as a code DEFAULT (not an env var) now silently adds new testers to the OLD group id, which may now mean something else (in our case the old auto-distribute group became founders-only, so new testers would get every internal build).

Check before the swap: grep the repo for the group id, and list env var NAMES on the host (e.g. `vercel env ls production | grep TESTFLIGHT`) to see whether an env override exists. If only the code default exists, change it test-first and deploy in the same window as the group swap.
