mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 23:21:44 -05:00
[PR #19685] [MERGED] fix: Default Group ID assignment on SSO/OAUTH and LDAP #64164
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/19685
Author: @Classic298
Created: 12/2/2025
Status: ✅ Merged
Merged: 12/2/2025
Merged by: @tjbck
Base:
dev← Head:patch-3📝 Commits (10+)
d38aac2fix (#99)75dbcddUpdate auths.pyc33835cunified logic0b0a8bbPUSH95540b1remove getattrfc6c912rem getattr9345783whitespaceea6ad5eUpdate oauth.py1597c9ctrusted header group sync26f1666not apply after syncs📊 Changes
3 files changed (+49 additions, -6 deletions)
View changed files
📝
backend/open_webui/routers/auths.py(+18 -5)➕
backend/open_webui/utils/groups.py(+24 -0)📝
backend/open_webui/utils/oauth.py(+7 -1)📄 Description
devbranch. Not targeting thedevbranch will lead to immediate closure of the PR.Changelog Entry
Description
The DEFAULT_GROUP_ID admin setting (Admin Panel → Settings → General → Default Group) was only being applied to users who signed up via the email/password signup form. Users registering through OAuth/SSO (Azure AD, Google, GitHub, etc.), LDAP, or when manually created by an admin were not being added to the configured default group.
This fix ensures the default group setting is consistently applied across all user registration methods upon initial account creation.
Added
Changed
Additional Information
Root Cause Analysis:
The original implementation only added default group assignment logic in the signup endpoint. The following registration flows were missing this logic:
Implementation Details:
Behavior:
The default group acts as an initial starting point for new users. After creation, group management systems have full control over group membership and may remove users from the default group during synchronization if it's not included in their external provider's group claims.
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.