GitHub user dosubot[bot] added a comment to the discussion: Best method to automatically create users in Superset at startup?
<!-- Answer --> The best practice for automatically creating users in Superset at startup is to use the Flask AppBuilder CLI commands (like `superset fab create-user`) in your deployment scripts or Docker entrypoint, not via `superset_config.py`. The config file is meant for configuration only and does not support user creation logic or hooks for this purpose. For consistent and idempotent user creation across deployments, script the CLI commands or, if you're on Superset 5.0.0+, enable the security API (`FAB_ADD_SECURITY_API = True`) and use the API for automation. More details are available in this discussion: [GitHub Issue #34467](https://github.com/apache/superset/issues/34467). <!-- 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/a62501c8-5859-4569-a56f-7821c795772c?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/a62501c8-5859-4569-a56f-7821c795772c?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/a62501c8-5859-4569-a56f-7821c795772c?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/a62501c8-5859-4569-a56f-7821c795772c?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/a62501c8-5859-4569-a56f-7821c795772c?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/a62501c8-5859-4569-a56f-7821c795772c?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/a62501c8-5859-4569-a56f-7821c795772c?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)& nbsp;[](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/35417) GitHub link: https://github.com/apache/superset/discussions/35417#discussioncomment-14562061 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
