Back

Granted Permission User Get 401 On Updating Permission

  • 0
  • Self Hosted
  • Auth
  • Databases
Suiii
31 Jul, 2024, 02:51

User Login ID: 66a0798a0023cb6c8bd0

I create session user to perform document!

Response update document: { code: 401, type: 'user_unauthorized', response: { message: 'Permissions must be one of: (any, users, user:66a0798a0023cb6c8bd0, user:66a0798a0023cb6c8bd0/unverified, users/unverified, team:644635d44a8d8bcfa705, member:66a5f759a94d46512b09, team:644635d44a8d8bcfa705/admin, label:admin)', code: 401, type: 'user_unauthorized', version: '1.5.7' } }

TL;DR
Developers are encountering a 401 error when trying to update permissions for a user. The issue lies in trying to grant permissions the user doesn't have. The response message indicates the allowed permissions to grant. Make sure to update the document and permissions accordingly while attempting to update user permissions with valid options.
Steven
31 Jul, 2024, 02:52

What are you sending for the update document?

Suiii
31 Jul, 2024, 02:54

updating document + permission!

Suiii
31 Jul, 2024, 02:54

I think permission, might be the issue here, but I read document, it can grant ?

Steven
31 Jul, 2024, 02:55

So you can't update the permissions to be something the user doesn't have. For example, you can't grant another user access

Suiii
31 Jul, 2024, 02:57

so only server sdk works! i see the response message seems able to do! a bit confused

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