Creating an Organization now creates a Team by the same name #1566

Closed
opened 2026-03-13 08:49:14 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @bnssoftware on GitHub (Jul 24, 2025).

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

Create a new member with the better auth api /organization/create endpoint and a new Team is also created by the same name as the organization.

Current vs. Expected behavior

I can't see the benefit of a team being created by the same name as the organization. This is either a bug or a feature. If a feature, I would like to have the option of enabling this or not when calling the /organization/create endpoint.

What version of Better Auth are you using?

1.3

Provide environment information

Windows 11

Which area(s) are affected? (Select all that apply)

Backend

Auth config (if applicable)

No response


### Additional context

_No response_
Originally created by @bnssoftware on GitHub (Jul 24, 2025). ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce Create a new member with the better auth api /organization/create endpoint and a new Team is also created by the same name as the organization. ### Current vs. Expected behavior I can't see the benefit of a team being created by the same name as the organization. This is either a bug or a feature. If a feature, I would like to have the option of enabling this or not when calling the /organization/create endpoint. ### What version of Better Auth are you using? 1.3 ### Provide environment information ```bash Windows 11 ``` ### Which area(s) are affected? (Select all that apply) Backend ### Auth config (if applicable) _No response_ ``` ### Additional context _No response_
GiteaMirror added the enhancement label 2026-03-13 08:49:14 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jul 24, 2025):

Hi @bnssoftware! I'm Dosu and I’m helping the better-auth team.

This is an intentional feature introduced in a recent update—when you create an organization, a team with the same name is automatically created as well. Currently, there’s no configuration option or flag to disable this behavior; it always happens when using the /organization/create endpoint. The relevant logic is in the handler and adapter code, and making this optional would require a code change to accept and respect a new parameter or config flag. The codebase is modular, so adding such an option is feasible, but it’s not available out of the box right now. You can see the implementation details and recent changes in the team support for organization pull request.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Jul 24, 2025): <!-- Greeting --> Hi @bnssoftware! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the better-auth team. <!-- Answer --> This is an intentional feature introduced in a recent update—when you create an organization, a team with the same name is automatically created as well. Currently, there’s no configuration option or flag to disable this behavior; it always happens when using the `/organization/create` endpoint. The relevant logic is in the handler and adapter code, and making this optional would require a code change to accept and respect a new parameter or config flag. The codebase is modular, so adding such an option is feasible, but it’s not available out of the box right now. You can see the implementation details and recent changes in the [team support for organization pull request](https://github.com/better-auth/better-auth/pull/1425). <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/22fe018c-4880-4dde-a2c2-126c20fe9885?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/22fe018c-4880-4dde-a2c2-126c20fe9885?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/22fe018c-4880-4dde-a2c2-126c20fe9885?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/22fe018c-4880-4dde-a2c2-126c20fe9885?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/22fe018c-4880-4dde-a2c2-126c20fe9885?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/22fe018c-4880-4dde-a2c2-126c20fe9885?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/22fe018c-4880-4dde-a2c2-126c20fe9885?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/cdda13d9-dd27-4d31-b09a-5d8bec92de21/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/better-auth/better-auth/issues/3574)
Author
Owner

@bnssoftware commented on GitHub (Jul 24, 2025):

A team name of Company Name, makes no sense.

@bnssoftware commented on GitHub (Jul 24, 2025): A team name of Company Name, makes no sense.
Author
Owner

@Bekacru commented on GitHub (Jul 24, 2025):

You can disable the feature by setting teams.defaultTeam.enabled to false. You can also pass a custom function to create custom default team by passing a callback for customCreateDefaultTeam. Sorry for the bot response and this wasn’t introduced in 1.3, it’s been available for a while.

@Bekacru commented on GitHub (Jul 24, 2025): You can disable the feature by setting `teams.defaultTeam.enabled` to `false`. You can also pass a custom function to create custom default team by passing a callback for `customCreateDefaultTeam`. Sorry for the bot response and this wasn’t introduced in 1.3, it’s been available for a while.
Author
Owner

@tkjaergaard commented on GitHub (Jan 23, 2026):

@Bekacru This might need to be in the documentation https://www.better-auth.com/docs/plugins/organization#teams

@tkjaergaard commented on GitHub (Jan 23, 2026): @Bekacru This might need to be in the documentation https://www.better-auth.com/docs/plugins/organization#teams
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#1566