You create a new table, add RLS policies that look perfect, and your API calls fail with:
error code 42501: permission denied for table profiles
Your RLS policies might be perfectly fine. The problem could be one layer below RLS: PostgreSQL privileges.
Supabase's recent default change makes this especially important. Here's what changed, the SQL that fixes it, and a two-user test to check that your policies still hold.
What changed
Supabase no longer automatically grants the API roles (anon, authenticated, and service_role) access to newly created tables in the public schema by default.
Here's the timeline:
April 28, 2026: Supabase introduced the option to create projects without automatically exposing new tables.
May 30, 2026: The new behavior began rolling out as the default for new projects.
October 30, 2026: The change was applied to existing projects.
Once this change reaches your project, newly created tables in the public schema require explicit grants before the Data API can access…