Server API: No Get Active Organization?
https://www.better-auth.com/docs/plugins/organization#use-active-organization
Seems likes getting the user's active organization is only available on client side and not with the server api?
Organization | Better Auth
The organization plugin allows you to manage your organization's members and teams.
6 Replies
Solution
you can use
auth.api.getFullOrganization
thats not active organization though right?
it is.
OHHH
@bekacru is there a way to get the active organization of the user without using
getFullOrganization
? If not, it appears to me that there is a lot of information returned like all the members of said organization as part of that particular API. Is there a way to modify the full organization request to omit certain fields of the payload so that it's as lean as possible in the event we only want a subset of the organization info (such as only name and org id)?You can get the active org Id from the session if that's what you're asking