Skip to content

Instantly share code, notes, and snippets.

@HelgeSverre
Created February 15, 2026 12:27
Show Gist options
  • Select an option

  • Save HelgeSverre/6dc0f1720b71661c2c7b50f87c4a4056 to your computer and use it in GitHub Desktop.

Select an option

Save HelgeSverre/6dc0f1720b71661c2c7b50f87c4a4056 to your computer and use it in GitHub Desktop.

--scope cannot distinguish between personal account and team with identical slug

Bug Description

When a personal account username and a team slug are identical, the --scope flag always resolves to the personal account, making it impossible to target the team. This effectively locks you out of team-scoped CLI operations like vercel dns add.

Steps to Reproduce

  1. Have a personal account with username myname
  2. Rename a team's slug to also be myname (the dashboard allows this)
  3. Try to run a team-scoped command:
$ vercel dns add example.com @ TXT "some-value" --scope myname
Vercel CLI 50.14.0
Error: You cannot set your Personal Account as the scope.

The CLI always interprets --scope myname as the personal account, with no way to target the team.

Expected Behavior

Either:

  • The CLI should disambiguate when a slug matches both a personal account and a team (e.g., prompt the user to choose, or prefer the team since personal accounts don't need --scope)
  • The dashboard should prevent setting a team slug identical to your personal account username
  • The CLI should accept team IDs (e.g., --scope team_PAnD0WJSPR6gdyAYYUOzP9hm) as an escape hatch

Workaround

Use the raw team ID from .vercel/project.json instead of the slug:

# Find the team ID
$ cat .vercel/project.json
{"projectId":"prj_...","orgId":"team_PAnD0WJSPR6gdyAYYUOzP9hm","projectName":"my-project"}

# Use it directly
$ vercel dns add example.com @ TXT "some-value" --scope team_PAnD0WJSPR6gdyAYYUOzP9hm
> Success!

This works but is not discoverable — most users would not think to try this.

Environment

  • Vercel CLI: 50.14.0
  • OS: macOS 15.6 (arm64)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment