Supabase “permission denied for table” (42501) on a new table: the October 30 grants change, explained and fixed

Supabase set 30 October 2026 as the date when new tables in the public schema of existing projects stop being reachable through the Data API (supabase-js, REST and GraphQL) automatically. If your AI builder just added a table and the app now fails with 42501, this is the most likely reason. Here's what Supabase has confirmed, what it hasn't, and the safe fix.

Short answer

Supabase is removing the default grants that made every new table in public reachable through the Data API. It scheduled the change for new projects from 30 May 2026 and for all existing projects on 30 October 2026. After it reaches your project, a new table answers 42501 “permission denied for table” until you grant access, even if it has RLS policies. Tables you already have keep their grants, and apps that only use a direct Postgres connection aren't affected. Fix: in the migration that creates the table, grant each role only what it needs, enable RLS and add policies. Don't paste grant all on all tables. Supabase hasn't posted a notice that the rollout is complete, so run the check below to see whether your project has switched.

What did Supabase change?

Until now, Supabase projects granted select, insert, update and delete on every new table in the public schema to the anon, authenticated and service_role roles. That's why a table showed up in your app the moment it was created, protected by RLS or not. Supabase is switching this off so that exposing a table becomes a deliberate step. Its reason, in its own changelog: agents, CLI scripts and AI platforms now create tables without a human reviewing the diff, and the old default exposed tables a developer forgot to protect.

Grants and RLS are two separate locks. A grant decides whether a role can touch a table at all; RLS decides which rows it can see. If the grant is missing, Postgres rejects the request before RLS is even checked, so adding policies alone won't fix a 42501 on a new table.

Supabase's rollout timeline for the grants change
DateWhat Supabase said would happen
28 Apr 2026 Changelog published; new projects can opt out of “Automatically expose new tables” at creation
30 May 2026 The new behavior becomes the default for new projects, rolled out gradually over a few weeks
23 Sep and 20–23 Oct 2026 Emails to owners and admins of active projects (five-week notice and final notice)
30 Oct 2026 The new behavior is applied to all existing projects

The final-notice email date reads 23 October on Supabase's changelog page and 20 October in the GitHub discussion of the same post.

Has it reached my project? Confirmed vs not confirmed

Checked on 3 November 2026 against Supabase's changelog, docs, GitHub discussion and CLI repository.

What is confirmed by Supabase and what isn't, as of 3 November 2026
ClaimStatusSource
Existing tables keep their current grants and stay reachable Confirmed Supabase changelog; a Supabase maintainer confirmed in the GitHub discussion (20 Jul) that they won't be silently revoked
Direct Postgres connections (psql, an ORM, a server with a connection string) are not affected Confirmed Supabase changelog
Tables in auth, storage, realtime and custom schemas are not affected Confirmed Supabase changelog FAQ
RLS behavior is unchanged Confirmed Supabase changelog
Every existing project switched on 30 October Not confirmed No completion notice on Supabase's changelog as of 3 Nov; the post only gives the schedule
New projects have used the new default since 30 May Unclear A Supabase CLI pull request merged on 26 Aug says the cloud default change “never landed” and platform projects still auto-exposed new tables at that time
Community reports that the change is live Unverified Reports conflict: a commenter in Supabase's GitHub discussion called it live on 2 Nov, while another developer reported a hosted project still on the old defaults on 31 Oct

Supabase's own “Securing your API” guide still says, as of 3 November, that on existing projects new objects in public receive the default privileges, and that Supabase is changing that default. So don't guess: the query in the next section tells you which behavior your project has right now.

Check your project in 30 seconds

Run this in the Supabase SQL Editor. It's the query from Supabase's “Securing your API” guide and lists what new tables, sequences and functions created by the postgres role in public will get.

SQL Editor
select
  case d.defaclobjtype
    when 'r' then 'tables'
    when 'S' then 'sequences'
    when 'f' then 'functions'
  end as object_type,
  a.grantee::regrole as role,
  string_agg(a.privilege_type, ', ' order by a.privilege_type) as privileges
from pg_default_acl d
cross join lateral aclexplode(d.defaclacl) a
where d.defaclrole = 'postgres'::regrole
  and d.defaclnamespace = 'public'::regnamespace
  and a.grantee in ('anon'::regrole, 'authenticated'::regrole, 'service_role'::regrole)
group by 1, 2
order by 1, 2;

If the tables rows for anon and authenticated include SELECT, INSERT, UPDATE, DELETE, your project still has the old behavior: new tables are exposed automatically (and need RLS straight away). If those four are missing, or the query returns no rows, new tables are closed until you grant them. Supabase's docs note that after the switch new tables still keep TRUNCATE, REFERENCES, TRIGGER and, on Postgres 17, MAINTAIN; the Data API doesn't use those.

You can also look in the Dashboard: Data API settings show the “Automatically expose new tables” setting, and the Table Editor shows a Data API exposure badge. Supabase says the Security Advisor flags affected tables.

What breaks after the switch, and what doesn't

  • Breaks: any table created in public after the switch, however it was created: SQL Editor, migrations, the Management API, MCP, the CLI or an AI coding tool (Supabase changelog).
  • Breaks: a table that a migration drops and creates again, or a table recreated from a backup without its grants. Postgres default privileges only apply to objects created later, and a recreated table is a new object (Postgres docs).
  • Breaks: new views. In Postgres, default privileges for tables also cover views (Postgres docs). The 42501 message then says “permission denied for view”.
  • Breaks: server code using the secret service_role key on a new table, for example an Edge Function, cron job or webhook. service_role skips RLS but still needs a grant; Supabase's grant examples include it.
  • Keeps working: tables that existed before the switch, functions called with rpc() (Postgres grants execute on new functions to every role through PUBLIC, per Supabase's docs), and anything that connects to Postgres directly.

How to fix a new table the safe way

Treat these three steps as a unit and put them in the same migration that creates the table, as Supabase recommends. Grant only what the app actually does. This example is a table that signed-in users read and write, with rows owned by user_id.

supabase/migrations/<timestamp>_todos.sql
-- 1. Grants: who may touch the table at all
grant select, insert, update, delete on table public.todos to authenticated;
grant select, insert, update, delete on table public.todos to service_role;
-- only if signed-out visitors must read it:
-- grant select on table public.todos to anon;

-- 2. RLS: on, always
alter table public.todos enable row level security;

-- 3. Policies: which rows each user may see and change
create policy "Users read own todos"
  on public.todos for select to authenticated
  using ((select auth.uid()) = user_id);

create policy "Users insert own todos"
  on public.todos for insert to authenticated
  with check ((select auth.uid()) = user_id);

If an insert into a table with a serial id then fails with “permission denied for sequence”, a Supabase maintainer's advice in the GitHub discussion is to grant usage, select on that sequence to the same roles.

For a new view, create it with security_invoker = true (Postgres 15+) and grant select on the view. Without security_invoker, a view runs with its owner's rights and skips the RLS of the tables underneath.

Read the hint before you paste it

PostgREST's 42501 response includes a hint with the exact grant, for example GRANT SELECT ON public.your_table TO anon;. Supabase designed it so agents can self-correct. But the hint names the role that made the failing request. If you (or your AI tool) tested while logged out, it says anon, even for a table only signed-in users should read. Granting anon there makes the table reachable with your public key, limited only by your RLS policies.

  • Don't run grant ... on all tables in schema public to anon, authenticated. Supabase gives that bulk grant as part of its rollback SQL; it exposes every table at once, including any without RLS.
  • Don't re-add alter default privileges ... grant .... That's Supabase's documented rollback of the whole change and puts every future table back on auto-exposure.
  • Don't turn off RLS to “test”, and never put the service_role key in frontend code: it bypasses RLS for anyone who opens your bundle.

Built with Lovable, Bolt, Cursor or Claude Code?

Supabase's changelog says AI coding tools that create tables need to include the grant step, and recommends updating the tool's system prompt or using the Supabase agent skill. If your builder writes Supabase migrations for you, add an instruction like this to its project rules or knowledge:

Every new table or view in the public schema needs, in the same migration:
explicit GRANT statements for only the roles and operations the app uses,
ALTER TABLE ... ENABLE ROW LEVEL SECURITY, and policies for each operation.
Never grant on all tables in schema public. Never use the service_role key in client code.

Then check the change it makes: the migration should contain grants, enable row level security and policies together. Supabase notes that the change applies regardless of how a table is created, so this matters whether the builder runs SQL for you or you paste it into the SQL Editor.

Find which tables and roles are affected

Supabase's 42501 troubleshooting guide gives two checks. List the grants on one table:

SQL Editor
select grantee, privilege_type
from information_schema.role_table_grants
where table_schema = 'public' and table_name = 'your_table';

If anon or authenticated (whichever your app uses) is missing the privilege the request needs, that's the cause. To see recent 42501 errors with the failing query, role and hint, use the logs query in Supabase's “Database API 42501 errors” guide. Remember that 42501 also appears when RLS blocks an insert or update; if the message is “new row violates row-level security policy”, see our RLS fix instead.

Common questions

Why does my new Supabase table return “permission denied for table”?

Most likely because your project no longer grants new tables in public to the Data API roles automatically. Grant the privileges the app needs to authenticated (and anon only for public data), enable RLS and add policies, in the migration that creates the table.

Will my existing tables stop working after 30 October 2026?

No. Supabase says existing tables keep their current grants, and a Supabase maintainer confirmed they won't be silently revoked. A table that a migration drops and recreates counts as new, though.

I added RLS policies and still get 42501. Why?

Policies only run after the grant check. Without a grant, Postgres rejects the request before RLS is evaluated, so you need both.

Does this affect Edge Functions using the service_role key?

Yes, if they use the Data API (supabase-js) on a new table. service_role bypasses RLS but still needs a grant. Code that connects to Postgres directly isn't affected.

Has Supabase finished rolling this out?

Not confirmed. As of 3 November 2026, Supabase's changelog gives 30 October as the date for existing projects but hasn't posted a completion notice. Run the default-privileges query on this page to see which behavior your project has.

Can I switch my project early, or go back?

Supabase's changelog gives the SQL for both: two alter default privileges ... revoke statements to opt in early, and matching grant statements plus bulk grants to roll back. Rolling back re-exposes every future table automatically, so prefer explicit grants.

Related on VibeLiftoff