diff --git a/backend/open_webui/utils/oauth.py b/backend/open_webui/utils/oauth.py index c76a1453b..bfcf22034 100644 --- a/backend/open_webui/utils/oauth.py +++ b/backend/open_webui/utils/oauth.py @@ -314,7 +314,7 @@ class OAuthManager: expires_delta=parse_duration(auth_manager_config.JWT_EXPIRES_IN), ) - if auth_manager_config.ENABLE_OAUTH_GROUP_MANAGEMENT: + if auth_manager_config.ENABLE_OAUTH_GROUP_MANAGEMENT and user.role != "admin": self.update_user_groups( user=user, user_data=user_data,