© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•14mo ago•
53 replies
Joris (askalia)

RLS policy set but message: "new row violates row-level security policy for table xxxxxx"

I attempt to insert a record via DB function using RPC. RLS is set on table and I send a access-token tied a authenticated user. got error.

I've built another DB function to ensure the user from access-token is really authentificated. I get
{
....
"aud": "authenticated",
"role": "authenticated",
...
}
Tried this RLS :
create policy "Enable users to handle their own data only"
on "public"."organisation"
to authenticated
using (
(( SELECT auth.uid() AS uid) = user_id)
);

Still get error.
Do you need more data ?
what sould I do ? ...something I've been mistaken with ?
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

New row violates row-level security policy for table
SupabaseSSupabase / help-and-questions
4y ago
New row violates row-level security policy for table objects
SupabaseSSupabase / help-and-questions
4y ago
'new row violates row-level security policy for table tickets
SupabaseSSupabase / help-and-questions
4y ago
StorageException(message new row violates row-level security policy for table objects, statusCode
SupabaseSSupabase / help-and-questions
4y ago
Next page