Skip to content

CLI link command fails with "necessary privileges" error for Project Owner #3705

Description

@walisonanjos

Hello Supabase Team,

I'm encountering a persistent "privileges" error when trying to run npx supabase link for my project, even though I am the confirmed Owner of the project.

Describe the bug
When running npx supabase link --project-ref nbqmhhbiollijnjnktpl, the command fails with the error: Your account does not have the necessary privileges to access this endpoint.

To Reproduce
Steps to reproduce the behavior:

In a Gitpod environment, install the Supabase CLI: npm install supabase --save-dev
Log in via the CLI: npx supabase login (this requires manual authentication via browser URL, as xdg-open is not available). Login is successful.
Run the link command: npx supabase link --project-ref nbqmhhbiollijnjnktpl
The command fails with the privileges error.
Expected behavior
The link command should successfully connect the local environment to the remote Supabase project after asking for the database password.

Screenshots
I have screenshots confirming:

My user role is Owner in the project settings.
The exact error message in the terminal after running the command.
The error persists even after trying a npx supabase logout / login cycle.
The error also persists when using a manually generated Access Token via SUPABASE_ACCESS_TOKEN=... npx supabase link.
System information

OS: Linux (via Gitpod)
Supabase CLI version: 2.24.3
Supabase Project Ref: nbqmhhbiollijnjnktpl
Additional context
I noticed there is an active incident on the Supabase status page related to "Sign in with Apple". While my login is via GitHub, I suspect this underlying auth instability might be related to the issue.

Thank you for your help!

Image
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions