[GH-ISSUE #24411] issue: OneDrive personal option shown in attachment menu even when ONEDRIVE_CLIENT_ID_PERSONAL is empty or unset #74894

Closed
opened 2026-05-13 07:44:22 -05:00 by GiteaMirror · 2 comments
Owner

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

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

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

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

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

  1. Start with a clean Docker deployment of Open WebUI (v0.8.12) with PostgreSQL backend.

  2. 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=

  3. 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

  4. Log into Open WebUI as admin.

  5. Navigate to Admin Panel → Settings → Documents and enable the OneDrive toggle.

  6. Hard refresh the browser (Ctrl+Shift+R).

  7. Open any chat and click the + attachment button.

  8. Observe that "Microsoft OneDrive (personal)" still appears as a submenu
    option alongside "Microsoft OneDrive (work/school)".

  9. 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.

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 - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### 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 - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### 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 1. Start with a clean Docker deployment of Open WebUI (v0.8.12) with PostgreSQL backend. 2. 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=<valid-azure-app-client-id> ONEDRIVE_SHAREPOINT_TENANT_ID=<valid-azure-tenant-id> ONEDRIVE_SHAREPOINT_URL=https://<tenant>.sharepoint.com ONEDRIVE_CLIENT_ID_PERSONAL= 3. 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=<set> ONEDRIVE_SHAREPOINT_TENANT_ID=<set> ONEDRIVE_SHAREPOINT_URL=<set> ENABLE_ONEDRIVE_INTEGRATION=true 4. Log into Open WebUI as admin. 5. Navigate to Admin Panel → Settings → Documents and enable the OneDrive toggle. 6. Hard refresh the browser (Ctrl+Shift+R). 7. Open any chat and click the + attachment button. 8. Observe that "Microsoft OneDrive (personal)" still appears as a submenu option alongside "Microsoft OneDrive (work/school)". 9. 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=<redacted> ONEDRIVE_CLIENT_ID_PERSONAL= ONEDRIVE_SHAREPOINT_URL=https://<tenant>.sharepoint.com ONEDRIVE_CLIENT_ID_BUSINESS=<redacted> 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} <!-- personal OneDrive menu item --> {/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.
GiteaMirror added the bug label 2026-05-13 07:44:22 -05:00
Author
Owner

@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:

  1. 🟣 #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_PERSONAL is empty/unset.
    by anengineerdude

  2. 🟣 #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

  3. 🟣 #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.

<!-- gh-comment-id:4389193009 --> @owui-terminator[bot] commented on GitHub (May 6, 2026): <!-- terminator-bot:related-issues-reply --> 🔍 **Related Issues Found** I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions: 1. 🟣 [#17275](https://github.com/open-webui/open-webui/issues/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_PERSONAL` is empty/unset.* *by anengineerdude* 2. 🟣 [#17965](https://github.com/open-webui/open-webui/issues/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`* 3. 🟣 [#13345](https://github.com/open-webui/open-webui/issues/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.
Author
Owner

@tjbck commented on GitHub (May 8, 2026):

Addressed in dev.

<!-- gh-comment-id:4408044766 --> @tjbck commented on GitHub (May 8, 2026): Addressed in dev.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#74894