Skip to content
Back

AppwriteException: The current user is not authorized to perform the requested action.

  • 0
  • Databases
  • React Native
  • Cloud
Musti
27 Jul, 2025, 05:03

Attempting to delete a document from a collection, and having the following error returned:

TypeScript
AppwriteException: The current user is not authorized to perform the requested action.

There are no document-level permissions set. It's my understanding that document level permissions are inherited from collection level permissions, which I've set true for all CRUD operations for the User role.

Document security on all collections is disabled.

The document that I'm trying to delete was created by the same user, and so the user has the ability to create and update the document. There's another collection that is exactly the same in terms of permissions and configuration, and the user is able to create and delete documents in that collection without any problem.

The problematic collection is one setup with relationship attributes to other collections - and the referenced collections have the same permission configuration - CRUD for all users.

What could be the problem?

TL;DR
Error message: Developers trying to delete a document from a collection, getting 'AppwriteException: The current user is not authorized to perform the requested action.' Issue: Document created by the user, same setup as another collection where deletions work fine. Possible solutions: Check document-level permissions (inherited from collection level), ensure relationships to other collections don't impact permissions (same configuration for referenced collections).
Musti
27 Jul, 2025, 05:19

Btw, the relationship attribute delete behaviour is set ID to NULL on delete.

Musti
27 Jul, 2025, 05:21

changing to cascade for all relationships also doesn't work.

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