mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 14:39:31 -05:00
[GH-ISSUE #24411] issue: OneDrive personal option shown in attachment menu even when ONEDRIVE_CLIENT_ID_PERSONAL is empty or unset #123602
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?
Originally created by @michimalek-besitec on GitHub (May 6, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24411
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.9.2
Ollama Version (if applicable)
N/A
Operating System
Ubuntu 24.04
Browser (if applicable)
Chrome / Edge (reproducible in both)
Confirmation
README.md.Expected Behavior
When ONEDRIVE_CLIENT_ID_PERSONAL is not set or is set to an empty string,
only the "Microsoft OneDrive (work/school)" option should appear in the
attachment menu. The "Microsoft OneDrive (personal)" option should be hidden,
as the documentation states options appear "depending on your configuration".
Actual Behavior
Both "Microsoft OneDrive (work/school)" and "Microsoft OneDrive (personal)"
appear in the attachment menu even when ONEDRIVE_CLIENT_ID_PERSONAL is
explicitly set to an empty string or omitted entirely. The personal option
cannot be suppressed without a code change.
Steps to Reproduce
Start with a clean Docker deployment of Open WebUI (v0.8.12) with PostgreSQL backend.
Configure the following environment variables in your Docker stack —
note that ONEDRIVE_CLIENT_ID_PERSONAL is intentionally empty:
ENABLE_ONEDRIVE_INTEGRATION=true
ONEDRIVE_CLIENT_ID_BUSINESS=
ONEDRIVE_SHAREPOINT_TENANT_ID=
ONEDRIVE_SHAREPOINT_URL=https://.sharepoint.com
ONEDRIVE_CLIENT_ID_PERSONAL=
Restart the container and confirm the env vars are set:
docker exec openwebui env | grep -i onedrive
Output confirms:
ONEDRIVE_CLIENT_ID_PERSONAL= ← empty string
ONEDRIVE_CLIENT_ID_BUSINESS=
ONEDRIVE_SHAREPOINT_TENANT_ID=
ONEDRIVE_SHAREPOINT_URL=
ENABLE_ONEDRIVE_INTEGRATION=true
Log into Open WebUI as admin.
Navigate to Admin Panel → Settings → Documents and enable the OneDrive toggle.
Hard refresh the browser (Ctrl+Shift+R).
Open any chat and click the + attachment button.
Observe that "Microsoft OneDrive (personal)" still appears as a submenu
option alongside "Microsoft OneDrive (work/school)".
Confirmed via PostgreSQL that no personal client ID is stored in the
persistent config:
SELECT data->'onedrive' FROM config ORDER BY id DESC LIMIT 1;
Result: {"enable": true}
No client_id_personal key is present in the DB — the option is rendered
entirely from the empty env var, which should evaluate as falsy.
Logs & Screenshots
docker exec openwebui env | grep -i onedrive output:
ONEDRIVE_SHAREPOINT_TENANT_ID=
ONEDRIVE_CLIENT_ID_PERSONAL=
ONEDRIVE_SHAREPOINT_URL=https://.sharepoint.com
ONEDRIVE_CLIENT_ID_BUSINESS=
ENABLE_ONEDRIVE_INTEGRATION=true
PostgreSQL config table (onedrive key only):
{"enable": true}
No client_id_personal key stored. The personal menu option renders regardless.
Additional Information
The likely fix is in src/lib/components/chat/MessageInput/InputMenu.svelte —
the personal OneDrive submenu item should be guarded with a truthy check:
{#if config?.onedrive?.client_id_personal}
{/if}
An empty string should evaluate as falsy and suppress the option.
Impact for enterprise deployments: organisations that want to restrict users
to work/school OneDrive only cannot currently hide the personal option,
which creates UI confusion and may cause users to attempt personal Microsoft
account authentication against an enterprise-only app registration.
@owui-terminator[bot] commented on GitHub (May 6, 2026):
🔍 Related Issues Found
I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions:
🟣 #17275 feat: Allow Disable on OneDrive personal
This is directly about allowing OneDrive personal to be disabled while keeping OneDrive work/school enabled. The new issue reports the same missing UI control, but specifically when
ONEDRIVE_CLIENT_ID_PERSONALis empty/unset.by anengineerdude
🟣 #17965 issue: OneDrive configuration broken
This issue reports OneDrive configuration logic being broken in the file picker, including incorrect checks around personal/business client IDs. It is related because the new issue is also about frontend OneDrive config not respecting env-based suppression of the personal option.
by jan-delaet ·
bug🟣 #13345 feat: OneDrive for business integration
This is the original OneDrive for business integration request and discusses the separate consumer vs enterprise auth paths. It is relevant background because the new issue concerns the UI exposing both personal and work/school options in an enterprise-only configuration.
by Andrew-Stubbs
💡 If your issue is a duplicate, please close it and add any additional details to the existing issue instead.
This comment was generated automatically. React with 👍 if helpful, 👎 if not.
@tjbck commented on GitHub (May 8, 2026):
Addressed in dev.