Rank 1: Thread
I'm trying to prevent team creation for any user.
I have a test code that simply connects with a third party service and tries to create a test team.
account.createOAuth2Session("microsoft", url_success, url_failure);
teams.create("test", "test").then((response) => { console.log(response); }).catch( (error) => { console.log(error); } );And I got the following error:
AppwriteException: User (role: guests) missing scope (teams.write)
at Client.<anonymous> (file:///Users/.../node_modules/appwrite/dist/esm/sdk.js:385:27)
at Generator.next (<anonymous>)
at fulfilled (file:///Users/.../node_modules/appwrite/dist/esm/sdk.js:22:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 401,
type: 'general_unauthorized_scope',
response: {
message: 'User (role: guests) missing scope (teams.write)',
code: 401,
type: 'general_unauthorized_scope',
version: '1.2.1'
}
}
But on the console the team is well created
(see picture)
If you have any advice or explanations to give me, I'm interested.
Thanks in advance