K
Kinde2d ago
bolg55

Best way to add user to org on creation?

Is there a best way to add a user to an org they just created? I am using Hono, so don't have an SDK to use.
3 Replies
Patrick
Patrick2d ago
Hi there, Thanks for reaching out. There are two options basically. Use the Management API directly if: - You want full control from your own backend or service. - You need to trigger the user-organization assignment as part of your application logic, outside of Kinde’s event triggers. - You are already handling organization creation and user assignment in your backend code (such as with Hono) and want immediate, synchronous control over the process. Use a Kinde workflow if: - You want the assignment to happen automatically within Kinde, based on platform events (such as after user authentication or organization creation). - You prefer to centralize business logic related to user-organization relationships inside Kinde, reducing the amount of code you need to maintain in your own backend. - You want to react to Kinde events without exposing additional endpoints or managing Management API tokens yourself. If your app logic is tightly coupled with organization creation and you need immediate response, use the Management API directly. If you want to automate the process based on Kinde events and reduce custom backend logic, use a workflow.
bolg55
bolg55OP2d ago
Thank you for the suggestion! I will play around
Patrick
Patrick2d ago
You are welcome. Please let me know if you have any questions or need help.

Did you find this page helpful?