Before submitting, make sure you've checked the following:
Target branch: Verify that the pull request targets the dev branch. Not targeting the dev branch will lead to immediate closure of the PR.
Description: Provide a concise description of the changes made in this pull request down below.
Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
Documentation: If necessary, update relevant documentation Open WebUI Docs like environment variables, the tutorials, or other documentation sources.
Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
Testing: Perform manual tests to verify the implemented fix/feature works as intended AND does not break any other functionality. Take this as an opportunity to make screenshots of the feature/fix and include it in the PR description.
Agentic AI Code: Confirm this Pull Request is not written by any AI Agent or has at least gone through additional human review AND manual testing. If any AI Agent is the co-author of this PR, it may lead to immediate closure of the PR.
Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
Title Prefix: To clearly categorize this pull request, prefix the pull request title using one of the following:
BREAKING CHANGE: Significant changes that may affect compatibility
build: Changes that affect the build system or external dependencies
ci: Changes to our continuous integration processes or workflows
chore: Refactor, cleanup, or other non-functional code changes
docs: Documentation update or addition
feat: Introduces a new feature or enhancement to the codebase
fix: Bug fix or error correction
i18n: Internationalization or localization changes
perf: Performance improvement
refactor: Code restructuring for better maintainability, readability, or scalability
style: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc.)
test: Adding missing tests or correcting existing tests
WIP: Work in progress, a temporary label for incomplete or ongoing work
Changelog Entry
Description
Refractored SCIM to be more conformant to the specification. Now, existing accounts should properly link to SCIM rather than generating a duplicate.
Added
Added ExternalId to be linked to the OIDC Subject Identifier
Added SCIM GetUsers endpoint to support eq filtering of both email and ExternalId
Fixed
SCIM no longer tries to match the username SCIM attribute to the email attribute of the User Model
SCIM now returns uniqueness conflict when creating account if the OIDC subject identifier already exists in the database
SCIM now sets the username in the User model of the DB
Additional Information
This was tested on my own Authentik instance.
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.
Note
Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/21099
**Author:** [@SCBionicle](https://github.com/SCBionicle)
**Created:** 2/2/2026
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `scim-fixes`
---
### 📝 Commits (10+)
- [`f2c16e3`](https://github.com/open-webui/open-webui/commit/f2c16e3232b2b84b2181c00f29d97a5f187dcb60) add primary email check create user
- [`197e14c`](https://github.com/open-webui/open-webui/commit/197e14c079626c7428c3316481b94021d9bd6fd5) make email search case insensitive
- [`68dceba`](https://github.com/open-webui/open-webui/commit/68dceba7318ebb39fdf095d8a3da02d4a0205945) add comment about matching
- [`6a902af`](https://github.com/open-webui/open-webui/commit/6a902afaac814b6fc76938ba94227a81f865afe4) SCIM: check to see if user exists already via Oauth
- [`2b99320`](https://github.com/open-webui/open-webui/commit/2b9932021e2d1e77f050a1e9a19f12d8b7928491) add helper to get just oidc subject
- [`d8dadfd`](https://github.com/open-webui/open-webui/commit/d8dadfd0e5766b2464992c4d40671f6905596216) add doc string
- [`9303517`](https://github.com/open-webui/open-webui/commit/9303517e73cf944a3cc3b5af870d83d24411cb94) add externalId to model
- [`cabe332`](https://github.com/open-webui/open-webui/commit/cabe332df8c75f3555f8f719ffe093d4c80f24dd) fix email filtering
- [`1214836`](https://github.com/open-webui/open-webui/commit/12148366500fffaf71337dff0af1a1aba7959d5b) allow case insenstive matching
- [`241d837`](https://github.com/open-webui/open-webui/commit/241d837709f154f1bc644dfbc732e7a97eb84de3) added case insenstive email matching
### 📊 Changes
**2 files changed** (+57 additions, -6 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/models/users.py` (+22 -2)
📝 `backend/open_webui/routers/scim.py` (+35 -4)
</details>
### 📄 Description
# Pull Request Checklist
**Before submitting, make sure you've checked the following:**
- [X] **Target branch:** Verify that the pull request targets the `dev` branch. **Not targeting the `dev` branch will lead to immediate closure of the PR.**
- [X] **Description:** Provide a concise description of the changes made in this pull request down below.
- [X] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description.
- [X] **Documentation:** If necessary, update relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs) like environment variables, the tutorials, or other documentation sources.
- [X] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation?
- [X] **Testing:** Perform manual tests to **verify the implemented fix/feature works as intended AND does not break any other functionality**. Take this as an opportunity to **make screenshots of the feature/fix and include it in the PR description**.
- [X] **Agentic AI Code:** Confirm this Pull Request is **not written by any AI Agent** or has at least **gone through additional human review AND manual testing**. If any AI Agent is the co-author of this PR, it may lead to immediate closure of the PR.
- [X] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
- [X] **Title Prefix:** To clearly categorize this pull request, prefix the pull request title using one of the following:
- **BREAKING CHANGE**: Significant changes that may affect compatibility
- **build**: Changes that affect the build system or external dependencies
- **ci**: Changes to our continuous integration processes or workflows
- **chore**: Refactor, cleanup, or other non-functional code changes
- **docs**: Documentation update or addition
- **feat**: Introduces a new feature or enhancement to the codebase
- **fix**: Bug fix or error correction
- **i18n**: Internationalization or localization changes
- **perf**: Performance improvement
- **refactor**: Code restructuring for better maintainability, readability, or scalability
- **style**: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc.)
- **test**: Adding missing tests or correcting existing tests
- **WIP**: Work in progress, a temporary label for incomplete or ongoing work
# Changelog Entry
### Description
- Refractored SCIM to be more conformant to the specification. Now, existing accounts should properly link to SCIM rather than generating a duplicate.
### Added
- Added `ExternalId` to be linked to the OIDC Subject Identifier
- Added SCIM `GetUsers` endpoint to support `eq` filtering of both email and `ExternalId`
### Fixed
- SCIM no longer tries to match the username SCIM attribute to the email attribute of the User Model
- SCIM now returns uniqueness conflict when creating account if the OIDC subject identifier already exists in the database
- SCIM now sets the username in the User model of the DB
---
### Additional Information
- This was tested on my own Authentik instance.
### Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms.
> [!NOTE]
> Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/21099
Author: @SCBionicle
Created: 2/2/2026
Status: ❌ Closed
Base:
dev← Head:scim-fixes📝 Commits (10+)
f2c16e3add primary email check create user197e14cmake email search case insensitive68dcebaadd comment about matching6a902afSCIM: check to see if user exists already via Oauth2b99320add helper to get just oidc subjectd8dadfdadd doc string9303517add externalId to modelcabe332fix email filtering1214836allow case insenstive matching241d837added case insenstive email matching📊 Changes
2 files changed (+57 additions, -6 deletions)
View changed files
📝
backend/open_webui/models/users.py(+22 -2)📝
backend/open_webui/routers/scim.py(+35 -4)📄 Description
Pull Request Checklist
Before submitting, make sure you've checked the following:
devbranch. Not targeting thedevbranch will lead to immediate closure of the PR.Changelog Entry
Description
Added
ExternalIdto be linked to the OIDC Subject IdentifierGetUsersendpoint to supporteqfiltering of both email andExternalIdFixed
Additional Information
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.