Skip to content

issue: OneDrive Personal Integration broken - redirect_uri contains dynamic chat ID #23450

@Lyhtande

Description

@Lyhtande

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

Ollama Version (if applicable)

No response

Operating System

Ubuntu 22.04.5 LTS

Browser (if applicable)

Chrome Version 146.0.7680.178 (Official Build) (64-Bit)

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 clicking "Microsoft OneDrive (personal)" in the attachment menu, a Microsoft login popup should open successfully. According to the documentation, the redirect_uri sent to Microsoft should be the base URL of the Open WebUI instance (e.g., https://your-openwebui-domain.com), which is also what needs to be registered as a SPA Redirect URI in the Azure App Registration.

Actual Behavior

The popup opens but immediately fails with:

invalid_request: The provided value for the input parameter 'redirect_uri' is not valid.

Inspecting the actual URL being called reveals that Open WebUI sends the current chat URL including a dynamic chat ID as the redirect_uri:
https://your-openwebui-domain.com/c/59db652a-170f-4fa2-8cb7-679a64588dfb

Steps to Reproduce

  1. Create a Personal Azure App Registration configured for consumers (Multitenant + personal Microsoft accounts)
  2. Set Redirect URI as SPA: https://your-openwebui-domain.com
  3. Enable Access tokens + ID tokens
  4. Set the following environment variables:
ENABLE_ONEDRIVE_INTEGRATION=true
ENABLE_ONEDRIVE_PERSONAL=true
ENABLE_ONEDRIVE_BUSINESS=false
ONEDRIVE_CLIENT_ID_PERSONAL=<your-client-id>
  1. Enable OneDrive toggle in Settings → Admin → Documents
  2. Click "Microsoft OneDrive (personal)" in the attachment menu
  3. Observe the popup failing with invalid_request

Logs & Screenshots

Image

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions