Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Is there any way to create organization after user create hook? - Better Auth
BA
Better Auth
•
11mo ago
•
12 replies
nikatune
Is there any way to create organization after user create hook?
Im getting UNAUTHORIZED error because im trying to create an organization for user with using user
:
{ create
:
{ after
{
}
}
} hook
.
Is there any way to avoid it
?
Solution
since you have the user id
, remove
headers
headers
and pass
userId
userId
in the body instead
Jump to solution
Better Auth
Join
9,988
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
create organization in databaseHooks.user.create.after
BA
Better Auth / help
11mo ago
is there any way to pre -create users?
BA
Better Auth / help
9mo ago
Create role after create organization
BA
Better Auth / help
2mo ago
Create organization after singUp
BA
Better Auth / help
11mo ago