GitHub user dosubot[bot] added a comment to the discussion: How to update user datas every they login SSO in Superset 5.0.0?
<!-- Answer --> Superset only guarantees role syncing on every SSO login (with `AUTH_ROLES_SYNC_AT_LOGIN`), but does not always update other user attributes like email, first_name, or last_name unless you add custom logic. This is a limitation inherited from Flask AppBuilder, not a bug in Superset itself. Even if your `oauth_user_info` returns fresh values, Superset may not update those fields for existing users on login unless you explicitly patch or extend the login flow to do so [docs](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/docs/docs/configuration/configuring-superset.mdx). To work around this, you can extend your custom `SecurityManager` to update user attributes after each SSO login. For example, inside your `oauth_user_info`, after fetching the user info, you could manually update the user record in the database if the user exists. You should also check your logs to confirm what claims Azure is sending and what Superset is receiving. If you want a code example for this workaround or need help debugging your Azure claims, let me know! <!-- 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/49ac718d-7a80-4328-b24d-395f4750439d?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/49ac718d-7a80-4328-b24d-395f4750439d?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/49ac718d-7a80-4328-b24d-395f4750439d?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/49ac718d-7a80-4328-b24d-395f4750439d?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/49ac718d-7a80-4328-b24d-395f4750439d?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/49ac718d-7a80-4328-b24d-395f4750439d?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/49ac718d-7a80-4328-b24d-395f4750439d?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/34608) GitHub link: https://github.com/apache/superset/discussions/34608#discussioncomment-14099156 ---- 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]
