Skip to content
Back

Cannot delete row (TablesDB with SessionClient)

  • 0
  • Databases
  • Web
Joey Joe Joe
29 Sep, 2025, 21:59

I'm trying to delete a row using the TablesDB typescript sdk and I'm initializing it with a session client. I've verified that my user has a valid session.

When running tablesDB.deleteRow, I always get a 401 user_unauthorized.

The table itself has no permissions set because this is an SSR web app. Instead, the row is configured with RLS and has the permission 'delete("team:68da0803001888be01b1/owner")' on it. This user is part of that team, and this user has the "owner" role.

Can row deletions only happen with the admin sdk or via a table-level configuration? Or am I missing something here.

TL;DR
Issue: Developer cannot delete a row using TablesDB TypeScript SDK with SessionClient, receiving a 401 user_unauthorized error message. Solution: The user is part of the team and has the necessary permission 'delete("team:68da0803001888be01b1/owner")' to delete the row, configured with RLS. Check the session user's permissions and ensure they match the necessary permissions for row deletion, as table permissions are not explicitly set due to being an SSR web app. Check the session user's role and permissions for any discrepancies or additional authorizations required for deletion.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more