Skip to content
Back

Create owner team member with Server function

  • 0
  • Functions
  • Auth
  • Cloud
Florian Vates
3 May, 2025, 23:37

I understand that when creating a team with a function, the user that made the request will not be the owner so I think I have to add the user that did the request as a member. However, I’m getting an error „Missing required parameter: "roles" at Teams.createMembership" Do you see anything I’m doing wrong? According to the documentation, the parameters are passed in correctly

https://appwrite.io/docs/references/cloud/server-nodejs/teams#createMembership

TL;DR
Issue: Error "Missing required parameter: 'roles' at Teams.createMembership" when trying to add the user that made the request as a member with a specific function while creating a team. Solution: The error is occurring because the 'roles' parameter is missing in the code. Make sure to include the necessary 'roles' parameter when creating the membership. Double-check the documentation and ensure all required parameters are being passed correctly in the Teams.createMembership method.
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