issue: OneDrive Integration Documentation Missing Environment Variable #80

Closed
opened 2026-02-15 17:06:00 -05:00 by yindo · 10 comments
Owner

Originally created by @christopherquenneville on GitHub (May 15, 2025).

Originally assigned to: @Classic298 on GitHub.

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Azure Container Docker Pull

Open WebUI Version

v0.6.9

Ollama Version (if applicable)

N/A

Operating System

Server = Azure Container running Linux. Client = Windows 11

Browser (if applicable)

Chrome

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 listed steps to reproduce the bug in detail.

Expected Behavior

There is missing this environment variable from documentation:
https://docs.openwebui.com/getting-started/env-configuration#onedrive

ONEDRIVE_SHAREPOINT_URL
Type: str
Default: None
Description: Specifies the Sharepoint URL. Example: "https://yourtenant.sharepoint.com"

Without this variable, the "Microsoft OneDrive (work/school) Includes SharePoint" does nothing

Also, there is missing information:

  1. App registration requires to be its own (for example, you can't reuse the Microsoft 365 OAuth).

  2. The redirect URI specified in the request is Open WebUI's URL (http://localhost:3000) (or https://yourdomain.com if you have it that way) + the path to the conversation for example:
    https://yourdomain.com/c/6d0e2ddc-314c-4e1f-8aaa-4e555f672f3d
    This can't be the desired behavior, as every conversation gets a unique id

  3. Missing information about permissions required for the App registration.
    Files.Read.All: 7495a24c-3e31-4d6a-b510-eba7b9ed143c
    Sites.Read.All: 589cf5b0-a8b4-4e7d-bf8a-122b0953517b
    Both in delegated with admin consent, to only give access to what the user can see usually

  4. The "ONEDRIVE_CLIENT_ID" variable is used inside the "Microsoft OneDrive (personal)" option. This makes no sense as the request goes to "login.live.com" but looks for a client id on the business side "login.microsoftonline.com". It outputs this error:

We're unable to complete your request
unauthorized_client: The client does not exist or is not enabled for consumers. If you are the application developer, configure a new application through the App Registrations in the Azure Portal at https://go.microsoft.com/fwlink/?linkid=2083908.

Was the excepted setup supposed to be about activating the app for any ms account? This is not recommanded:

Due to temporary differences in supported functionality, we don't recommend enabling personal Microsoft accounts for an existing registration. If you need to enable personal accounts, you can do so using the manifest editor. Learn more about these restrictions.​

  1. Once correctly set (just to test I added the redirect URI to "https://yourdomain.com/c/6d0e2ddc-314c-4e1f-8aaa-4e555f672f3d") The "Microsoft OneDrive (work/school) Includes SharePoint" option just loads and then exits, without anything happening afterwards.

Actual Behavior

Documentation currently only includes:

ENABLE_ONEDRIVE_INTEGRATION
Type: bool
Default: False
Description: Enables or disables OneDrive integration.
Persistence: This environment variable is a PersistentConfig variable.

ONEDRIVE_CLIENT_ID
Type: str
Default: None
Description: Specifies the client ID for OneDrive integration.
Persistence: This environment variable is a PersistentConfig variable.

Steps to Reproduce

https://docs.openwebui.com/getting-started/env-configuration#onedrive

Logs & Screenshots

https://docs.openwebui.com/getting-started/env-configuration#onedrive

Additional Information

Love the app! Just need that functionnality to be able to import OneDrive / SharePoint data.
Keep up the good work! :)

Originally created by @christopherquenneville on GitHub (May 15, 2025). Originally assigned to: @Classic298 on GitHub. ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Azure Container Docker Pull ### Open WebUI Version v0.6.9 ### Ollama Version (if applicable) N/A ### Operating System Server = Azure Container running Linux. Client = Windows 11 ### Browser (if applicable) Chrome ### 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 listed steps to reproduce the bug in detail. ### Expected Behavior There is missing this environment variable from documentation: https://docs.openwebui.com/getting-started/env-configuration#onedrive ONEDRIVE_SHAREPOINT_URL Type: str Default: None Description: Specifies the Sharepoint URL. Example: "https://yourtenant.sharepoint.com" Without this variable, the "Microsoft OneDrive (work/school) Includes SharePoint" does nothing Also, there is missing information: 1. App registration requires to be its own (for example, you can't reuse the Microsoft 365 OAuth). 2. The redirect URI specified in the request is Open WebUI's URL (http://localhost:3000) (or https://yourdomain.com if you have it that way) + the path to the conversation for example: https://yourdomain.com/c/6d0e2ddc-314c-4e1f-8aaa-4e555f672f3d This can't be the desired behavior, as every conversation gets a unique id 3. Missing information about permissions required for the App registration. Files.Read.All: 7495a24c-3e31-4d6a-b510-eba7b9ed143c Sites.Read.All: 589cf5b0-a8b4-4e7d-bf8a-122b0953517b Both in delegated with admin consent, to only give access to what the user can see usually 4. The "ONEDRIVE_CLIENT_ID" variable is used inside the "Microsoft OneDrive (personal)" option. This makes no sense as the request goes to "login.live.com" but looks for a client id on the business side "login.microsoftonline.com". It outputs this error: > We're unable to complete your request > unauthorized_client: The client does not exist or is not enabled for consumers. If you are the application developer, configure a new application through the App Registrations in the Azure Portal at https://go.microsoft.com/fwlink/?linkid=2083908. Was the excepted setup supposed to be about activating the app for any ms account? This is not recommanded: > Due to temporary differences in supported functionality, we don't recommend enabling personal Microsoft accounts for an existing registration. If you need to enable personal accounts, you can do so using the manifest editor. [Learn more about these restrictions.​](https://go.microsoft.com/fwlink/?linkid=2107401) 5. Once correctly set (just to test I added the redirect URI to "https://yourdomain.com/c/6d0e2ddc-314c-4e1f-8aaa-4e555f672f3d") The "Microsoft OneDrive (work/school) Includes SharePoint" option just loads and then exits, without anything happening afterwards. ### Actual Behavior Documentation currently only includes: ENABLE_ONEDRIVE_INTEGRATION Type: bool Default: False Description: Enables or disables OneDrive integration. Persistence: This environment variable is a PersistentConfig variable. ONEDRIVE_CLIENT_ID Type: str Default: None Description: Specifies the client ID for OneDrive integration. Persistence: This environment variable is a PersistentConfig variable. ### Steps to Reproduce https://docs.openwebui.com/getting-started/env-configuration#onedrive ### Logs & Screenshots https://docs.openwebui.com/getting-started/env-configuration#onedrive ### Additional Information Love the app! Just need that functionnality to be able to import OneDrive / SharePoint data. Keep up the good work! :)
yindo added the bug label 2026-02-15 17:06:00 -05:00
yindo closed this issue 2026-02-15 17:06:01 -05:00
Author
Owner

@ethux commented on GitHub (Jun 3, 2025):

Ok so I did some research myself on this and got it to work, hopefully it can help some people.


I followed all the same steps, but for the redirect URI I added my Open WebUI URL as:

Single-page application
Redirect URIs

Instead of a"Web" Redirect URI one.


Besides that I had to allow pop-ups from 'Open WebUI' within Chrome, the same goes for Firefox. (this was the main issue for me, I didn't get a clear message from the browser it was blocking pop-ups).

So now when I open an existing chat or a new chat, and I select OneDrive for Work I get a pop-up in a new window where I can select my own files.

Note: I only tested this for a Sharepoint environment, not for the personal One Drive one.

@ethux commented on GitHub (Jun 3, 2025): Ok so I did some research myself on this and got it to work, hopefully it can help some people. --- I followed all the same steps, but for the redirect URI I added my Open WebUI URL as: ``` Single-page application Redirect URIs ``` Instead of a"Web" Redirect URI one. --- Besides that I had to allow pop-ups from 'Open WebUI' within Chrome, the same goes for Firefox. (this was the main issue for me, I didn't get a clear message from the browser it was blocking pop-ups). So now when I open an existing chat or a new chat, and I select OneDrive for Work I get a pop-up in a new window where I can select my own files. Note: I only tested this for a Sharepoint environment, not for the personal One Drive one.
Author
Owner

@m20l22 commented on GitHub (Sep 5, 2025):

Thanks a lot @christopherquenneville and @ethux for the provided information! It was very helpful for successfully setting up OneDrive integration in my environment. I agree this is a must have information at the OI docs.

@m20l22 commented on GitHub (Sep 5, 2025): Thanks a lot @christopherquenneville and @ethux for the provided information! It was very helpful for successfully setting up OneDrive integration in my environment. I agree this is a must have information at the OI docs.
Author
Owner

@Classic298 commented on GitHub (Sep 17, 2025):

is added in latest version

@Classic298 commented on GitHub (Sep 17, 2025): is added in latest version
Author
Owner

@anengineerdude commented on GitHub (Sep 17, 2025):

Where did this land in the docs? I'm finding it hard to search as the search only returns 5 results and all linking to the env vars page....

@anengineerdude commented on GitHub (Sep 17, 2025): Where did this land in the docs? I'm finding it hard to search as the search only returns 5 results and all linking to the env vars page....
Author
Owner

@m20l22 commented on GitHub (Sep 18, 2025):

I agree with @anengineerdude , I could not find this info in docs as well.

@m20l22 commented on GitHub (Sep 18, 2025): I agree with @anengineerdude , I could not find this info in docs as well.
Author
Owner

@Classic298 commented on GitHub (Sep 19, 2025):

My fault i misunderstood the description. I fixed another missing documentation - but I thought it was what was being asked here.

I'll address it soon

@Classic298 commented on GitHub (Sep 19, 2025): My fault i misunderstood the description. I fixed another missing documentation - but I thought it was what was being asked here. I'll address it soon
Author
Owner

@Classic298 commented on GitHub (Sep 19, 2025):

ONEDRIVE_SHAREPOINT_URL and ONEDRIVE_SHAREPOINT_TENANT_ID are now added to the docs the last time i commented here, that was my misunderstanding. I thought you meant simply that these env vars were missing (now they're added) but you also want a basic tutorial of how to set it up, I presume based on your writing

@Classic298 commented on GitHub (Sep 19, 2025): ONEDRIVE_SHAREPOINT_URL and ONEDRIVE_SHAREPOINT_TENANT_ID are now added to the docs the last time i commented here, that was my misunderstanding. I thought you meant simply that these env vars were missing (now they're added) but you also want a basic tutorial of how to set it up, I presume based on your writing
Author
Owner

@Classic298 commented on GitHub (Sep 20, 2025):

Hey @christopherquenneville, @ethux, @anengineerdude and @m20l22,

Just wanted to follow up on this issue. Based on your detailed feedback, I've submitted a pull request that I believe resolves the core architectural flaw with the OneDrive integration:

This PR introduces a new ONEDRIVE_PERSONAL_CLIENT_ID environment variable to completely separate the configuration for personal and business accounts. This allows both integrations to be configured and used independently, fixing the unauthorized_client error.

Comprehensive documentation, including a new step-by-step tutorial, has been prepared alongside this fix to cover all the setup points you raised.

These are already pushed to dev, but obviously, if the Pull Request does not get merged, I will revert those changes in the dev branch.

Please check out the PR and provide feedback and test it.

Hopefully, this gets reviewed and merged soon. This should fully address the problems discussed here. Thanks for bringing this to light

@Classic298 commented on GitHub (Sep 20, 2025): Hey @christopherquenneville, @ethux, @anengineerdude and @m20l22, Just wanted to follow up on this issue. Based on your detailed feedback, I've submitted a pull request that I believe resolves the core architectural flaw with the OneDrive integration: * **PR:** [17619](https://github.com/open-webui/open-webui/pull/17619) This PR introduces a new `ONEDRIVE_PERSONAL_CLIENT_ID` environment variable to completely separate the configuration for personal and business accounts. This allows both integrations to be configured and used independently, fixing the `unauthorized_client` error. Comprehensive documentation, including a new step-by-step tutorial, has been prepared alongside this fix to cover all the setup points you raised. These are already pushed to `dev`, but obviously, if the Pull Request does not get merged, I will revert those changes in the dev branch. - updated (DEV!) env var conf: https://github.com/open-webui/docs/blob/main/docs/getting-started/env-configuration.md#OneDrive - new (DEV!) tutoiral for onedrive and sharepoint: https://github.com/open-webui/docs/blob/dev/docs/tutorials/integrations/onedrive-sharepoint.mdx - as i said, both based on the PR, - they'll get reverted by me if the PR doesn't get merged Please check out the PR and provide feedback and test it. Hopefully, this gets reviewed and merged soon. This should fully address the problems discussed here. Thanks for bringing this to light
Author
Owner

@Classic298 commented on GitHub (Sep 20, 2025):

Feedback on the NEW tutorial page is welcome/wanted - I wrote it with help of AI and I am not well versed in Entra, but as far as I could check it should be accurate - but please do read it and provide feedback.

@Classic298 commented on GitHub (Sep 20, 2025): Feedback on the NEW tutorial page is welcome/wanted - I wrote it with help of AI and I am not well versed in Entra, but as far as I could check it should be accurate - but please do read it and provide feedback.
Author
Owner

@Classic298 commented on GitHub (Sep 22, 2025):

Fixed in dev: https://github.com/open-webui/open-webui/commit/466d5bb69636e280e81b2ae55278ef49808b5fb5

Docs added in dev too

Enjoy

@Classic298 commented on GitHub (Sep 22, 2025): Fixed in dev: https://github.com/open-webui/open-webui/commit/466d5bb69636e280e81b2ae55278ef49808b5fb5 Docs added in dev too Enjoy
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: open-webui/docs#80