[GH-ISSUE #13537] issue: OneDrive file picker (only for organizations) throws an error #103938

Closed
opened 2026-05-18 01:34:10 -05:00 by GiteaMirror · 24 comments
Owner

Originally created by @davejohnb on GitHub (May 5, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/13537

Check Existing Issues

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

Installation Method

Docker

Open WebUI Version

v0.6.6

Ollama Version (if applicable)

No response

Operating System

MacOS 15.4.1

Browser (if applicable)

Chrome 136.0.7103.48

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

  • When I choose “Work/School” (organizational) in the OneDrive picker, I should see my company files listed just like my personal files
  • Clicking on a file should immediately return me the file’s name and data
  • No errors should appear in the console

Actual Behavior

  • Instead of showing my company files, the picker page loads a SharePoint error or login page.
  • The app then tries to read that page as if it were data and crashes with:
    Unexpected token '<', "<!doctype “… is not valid JSON
  • I never get the file I picked—just an error.

Steps to Reproduce

  1. Set up the app to use an organizational OneDrive account (not a personal one).

  2. Open the file picker in the app.

  3. The picker popup appears but shows an error page instead of your files.

  4. Check the browser console—you’ll see the JSON parse error about “Unexpected token ‘<’.”

Logs & Screenshots

Image Image

Additional Information

@hurxxxx As you developed this part of the application, can you reproduce my error? Thanks for your help.

Just FYI: A suggestion of GPT was to simply remove the if (…organizations)… branch in getPickerParams()

function getPickerParams(): PickerParams {
  const channelId = uuidv4();
  return {
    sdk: '8.0',
    entry: {
      oneDrive: {
        files: {}            // ← always include this
      }
    },
    authentication: {},
    messaging: {
      origin: window.location.origin,
      channelId
    },
    typesAndSources: {
      mode: 'files',
      pivots: {
        oneDrive: true,
        recent:   true
      }
    },
    selection: {
      mode: 'pick'
    }
  };
}
Originally created by @davejohnb on GitHub (May 5, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/13537 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.6.6 ### Ollama Version (if applicable) _No response_ ### Operating System MacOS 15.4.1 ### Browser (if applicable) Chrome 136.0.7103.48 ### 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 - When I choose “Work/School” (organizational) in the OneDrive picker, I should see my company files listed just like my personal files - Clicking on a file should immediately return me the file’s name and data - No errors should appear in the console ### Actual Behavior - Instead of showing my company files, the picker page loads a SharePoint error or login page. - The app then tries to read that page as if it were data and crashes with: `Unexpected token '<', "<!doctype “… is not valid JSON` - I never get the file I picked—just an error. ### Steps to Reproduce 1. Set up the app to use an organizational OneDrive account (not a personal one). 2. Open the file picker in the app. 3. The picker popup appears but shows an error page instead of your files. 4. Check the browser console—you’ll see the JSON parse error about “Unexpected token ‘<’.” ### Logs & Screenshots <img width="656" alt="Image" src="https://github.com/user-attachments/assets/c6baa684-ec23-4330-82bc-15fb6ee9f594" /> <img width="799" alt="Image" src="https://github.com/user-attachments/assets/11b3dbd8-e262-4de5-86ae-56919f85be74" /> ### Additional Information @hurxxxx As you developed this part of the application, can you reproduce my error? Thanks for your help. Just FYI: A suggestion of GPT was to simply remove the if (…organizations)… branch in getPickerParams() ``` function getPickerParams(): PickerParams { const channelId = uuidv4(); return { sdk: '8.0', entry: { oneDrive: { files: {} // ← always include this } }, authentication: {}, messaging: { origin: window.location.origin, channelId }, typesAndSources: { mode: 'files', pivots: { oneDrive: true, recent: true } }, selection: { mode: 'pick' } }; } ```
GiteaMirror added the bug label 2026-05-18 01:34:10 -05:00
Author
Owner

@hurxxxx commented on GitHub (May 6, 2025):

I'll check it out soon.

<!-- gh-comment-id:2853229464 --> @hurxxxx commented on GitHub (May 6, 2025): I'll check it out soon.
Author
Owner

@hurxxxx commented on GitHub (May 6, 2025):

I attempted to reproduce the issue in my environment, but was unable to observe the same behavior. I’ve reviewed the solution suggested by GPT, but it doesn’t appear to be relevant to this particular issue.

To help diagnose the problem further, could you please provide the full error stack trace from the browser console, as well as the request/response details from the Network tab at the time the issue occurs?

In addition, please double-check that the Permissions section described in the following documentation is correctly configured:
https://learn.microsoft.com/en-us/onedrive/developer/controls/file-pickers/?view=odsp-graph-online

<!-- gh-comment-id:2854684909 --> @hurxxxx commented on GitHub (May 6, 2025): I attempted to reproduce the issue in my environment, but was unable to observe the same behavior. I’ve reviewed the solution suggested by GPT, but it doesn’t appear to be relevant to this particular issue. To help diagnose the problem further, could you please provide the full error stack trace from the browser console, as well as the request/response details from the Network tab at the time the issue occurs? In addition, please double-check that the Permissions section described in the following documentation is correctly configured: https://learn.microsoft.com/en-us/onedrive/developer/controls/file-pickers/?view=odsp-graph-online
Author
Owner

@NovaCarlili commented on GitHub (May 6, 2025):

I'm experiencing a similar issue after updating to v0.6.6.
In a new chat window, clicking on the + sign and selecting Microsoft OneDrive -> Microsoft OneDrive (work/school),
nothing seems to happen on the web page, but when inspecting the browser's console I get the following:

Image

I have ENABLE_ONEDRIVE_INTEGRATION set to True and ONEDRIVE_SHAREPOINT_URL configured to one of our Sharepoint sites in my environment variables.

I might be missing something here...

<!-- gh-comment-id:2855139740 --> @NovaCarlili commented on GitHub (May 6, 2025): I'm experiencing a similar issue after updating to v0.6.6. In a new chat window, clicking on the + sign and selecting Microsoft OneDrive -> Microsoft OneDrive (work/school), nothing seems to happen on the web page, but when inspecting the browser's console I get the following: <img width="421" alt="Image" src="https://github.com/user-attachments/assets/0098d689-3780-4780-a3dc-bfe57d6ff458" /> I have ENABLE_ONEDRIVE_INTEGRATION set to True and ONEDRIVE_SHAREPOINT_URL configured to one of our Sharepoint sites in my environment variables. I might be missing something here...
Author
Owner

@davejohnb commented on GitHub (May 6, 2025):

@hurxxxx Thanks for investigating. I had already added the following permissions:

Image

This is the entire error stack trace in the console at the time after choosing a file, then trying to add it to the chat:

+layout.svelte:493 Backend config: {status: true, name: 'Open WebUI', version: '0.6.6', default_locale: '', oauth: {…}, …}
websocket.ts:24 connected rP_bWcEnIHd0bpjUAB9W
websocket.ts:43 user-list {user_ids: Array(1)}
websocket.ts:48 usage {models: Array(0)}
websocket.ts:43 user-list {user_ids: Array(1)}
Chat.svelte:402 mounted
ChatControls.svelte:208 size 0 20
Chat.svelte:689 ['gpt-4o-shared']
RichTextInput.svelte:185 content 
RichTextInput.svelte:187 [tiptap warn]: Duplicate extension names found: ['codeBlock']. This can lead to issues.
resolve @ index.js:1183
tn @ index.js:1169
createExtensionManager @ index.js:4580
BE @ index.js:4412
(anonymous) @ RichTextInput.svelte:187
await in (anonymous)
J @ utils.js:41
(anonymous) @ Component.js:47
_t @ scheduler.js:99
Promise.then
ut @ scheduler.js:20
ht @ Component.js:81
(anonymous) @ Component.js:139
(anonymous) @ +layout.svelte:223
await in (anonymous)
J @ utils.js:41
(anonymous) @ Component.js:47
_t @ scheduler.js:99
Promise.then
ut @ scheduler.js:20
ht @ Component.js:81
(anonymous) @ Component.js:139
(anonymous) @ +layout.svelte:588
await in (anonymous)
J @ utils.js:41
(anonymous) @ Component.js:47
_t @ scheduler.js:99
Pt @ Component.js:164
wt @ root.svelte:23
ct @ client.js:472
Z @ client.js:1580
await in Z
Le @ client.js:398
pn @ client.js:1926
In @ client.js:323
await in In
(anonymous) @ (index):130
Promise.then
(anonymous) @ (index):129
MessageInput.svelte:1076 OneDrive Error: SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON
Ht @ MessageInput.svelte:1076
await in Ht
A @ InputMenu.svelte:335
(anonymous) @ lifecycle.js:105
(anonymous) @ lifecycle.js:104
(anonymous) @ events.js:8
C @ event.js:43
(anonymous) @ event.js:48

And this is the activity in the network tab (for the time of opening the picker and trying to load a single file):

Image

and

Image

Is there any "how-to" you could share for this feature, since it’s not yet documented? Others might run into the same issue.

I’d be happy to check if it works from a configuration standpoint and then suggest or contribute it for the official OWUI documentation.

<!-- gh-comment-id:2855209858 --> @davejohnb commented on GitHub (May 6, 2025): @hurxxxx Thanks for investigating. I had already added the following permissions: <img width="651" alt="Image" src="https://github.com/user-attachments/assets/d4631dba-8963-46a2-bc7c-1808494e4912" /> This is the entire error stack trace in the console at the time after choosing a file, then trying to add it to the chat: ``` +layout.svelte:493 Backend config: {status: true, name: 'Open WebUI', version: '0.6.6', default_locale: '', oauth: {…}, …} websocket.ts:24 connected rP_bWcEnIHd0bpjUAB9W websocket.ts:43 user-list {user_ids: Array(1)} websocket.ts:48 usage {models: Array(0)} websocket.ts:43 user-list {user_ids: Array(1)} Chat.svelte:402 mounted ChatControls.svelte:208 size 0 20 Chat.svelte:689 ['gpt-4o-shared'] RichTextInput.svelte:185 content RichTextInput.svelte:187 [tiptap warn]: Duplicate extension names found: ['codeBlock']. This can lead to issues. resolve @ index.js:1183 tn @ index.js:1169 createExtensionManager @ index.js:4580 BE @ index.js:4412 (anonymous) @ RichTextInput.svelte:187 await in (anonymous) J @ utils.js:41 (anonymous) @ Component.js:47 _t @ scheduler.js:99 Promise.then ut @ scheduler.js:20 ht @ Component.js:81 (anonymous) @ Component.js:139 (anonymous) @ +layout.svelte:223 await in (anonymous) J @ utils.js:41 (anonymous) @ Component.js:47 _t @ scheduler.js:99 Promise.then ut @ scheduler.js:20 ht @ Component.js:81 (anonymous) @ Component.js:139 (anonymous) @ +layout.svelte:588 await in (anonymous) J @ utils.js:41 (anonymous) @ Component.js:47 _t @ scheduler.js:99 Pt @ Component.js:164 wt @ root.svelte:23 ct @ client.js:472 Z @ client.js:1580 await in Z Le @ client.js:398 pn @ client.js:1926 In @ client.js:323 await in In (anonymous) @ (index):130 Promise.then (anonymous) @ (index):129 MessageInput.svelte:1076 OneDrive Error: SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON Ht @ MessageInput.svelte:1076 await in Ht A @ InputMenu.svelte:335 (anonymous) @ lifecycle.js:105 (anonymous) @ lifecycle.js:104 (anonymous) @ events.js:8 C @ event.js:43 (anonymous) @ event.js:48 ``` And this is the activity in the network tab (for the time of opening the picker and trying to load a single file): <img width="918" alt="Image" src="https://github.com/user-attachments/assets/90b8e047-7a9b-4790-8364-171e0af9f87c" /> and <img width="938" alt="Image" src="https://github.com/user-attachments/assets/d6d7d5e9-f2f5-49f7-bfee-78aeea0ef794" /> Is there any "how-to" you could share for this feature, since it’s not yet documented? Others might run into the same issue. I’d be happy to check if it works from a configuration standpoint and then suggest or contribute it for the official OWUI documentation.
Author
Owner

@davejohnb commented on GitHub (May 6, 2025):

I'm experiencing a similar issue after updating to v0.6.6. In a new chat window, clicking on the + sign and selecting Microsoft OneDrive -> Microsoft OneDrive (work/school), nothing seems to happen on the web page, but when inspecting the browser's console I get the following:

Image I have ENABLE_ONEDRIVE_INTEGRATION set to True and ONEDRIVE_SHAREPOINT_URL configured to one of our Sharepoint sites in my environment variables.

I might be missing something here...

@NovaCarlili did you already create and configure an app registration on Azure (including redirect URL, etc)?

<!-- gh-comment-id:2855218678 --> @davejohnb commented on GitHub (May 6, 2025): > I'm experiencing a similar issue after updating to v0.6.6. In a new chat window, clicking on the + sign and selecting Microsoft OneDrive -> Microsoft OneDrive (work/school), nothing seems to happen on the web page, but when inspecting the browser's console I get the following: > > <img alt="Image" width="421" src="https://private-user-images.githubusercontent.com/170635180/440863979-0098d689-3780-4780-a3dc-bfe57d6ff458.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDY1NDkyNTAsIm5iZiI6MTc0NjU0ODk1MCwicGF0aCI6Ii8xNzA2MzUxODAvNDQwODYzOTc5LTAwOThkNjg5LTM3ODAtNDc4MC1hM2RjLWJmZTU3ZDZmZjQ1OC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwNTA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDUwNlQxNjI5MTBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kYjcxMTk0OTM3YjlhNDJlYmI3ZGQ5MjU5Njg2NGU0M2IyYjMzNTZkMzk5YzM0MzU3NjIzZjEwMDkzYjUwMTc3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.EN4ghrAeeTurihMOWsb-G0HG6-dO3z553UJm0q23pQA"> > I have ENABLE_ONEDRIVE_INTEGRATION set to True and ONEDRIVE_SHAREPOINT_URL configured to one of our Sharepoint sites in my environment variables. > > I might be missing something here... @NovaCarlili did you already create and configure an app registration on Azure (including redirect URL, etc)?
Author
Owner

@borysow commented on GitHub (May 7, 2025):

We have an on-premises install of sharepoint over here and I’m seeing the same issue. No Azure involved. Is this an issue if missing SSO?

<!-- gh-comment-id:2856821802 --> @borysow commented on GitHub (May 7, 2025): We have an on-premises install of sharepoint over here and I’m seeing the same issue. No Azure involved. Is this an issue if missing SSO?
Author
Owner

@hurxxxx commented on GitHub (May 7, 2025):

@davejohnb Does it proceed up to the file selection step?

<!-- gh-comment-id:2856977093 --> @hurxxxx commented on GitHub (May 7, 2025): @davejohnb Does it proceed up to the file selection step?
Author
Owner

@davejohnb commented on GitHub (May 7, 2025):

@hurxxxx the picker popup shows up with the error message, but I can then navigate to a folder (left sidebar). After selecting a file and pressing the "Select" button, the spinner shows up on the button, the popup closes but the file is not getting loaded into the chat.

Image
<!-- gh-comment-id:2858138510 --> @davejohnb commented on GitHub (May 7, 2025): @hurxxxx the picker popup shows up with the error message, but I can then navigate to a folder (left sidebar). After selecting a file and pressing the "Select" button, the spinner shows up on the button, the popup closes but the file is not getting loaded into the chat. <img width="820" alt="Image" src="https://github.com/user-attachments/assets/4d24dbd1-c611-419a-9554-a767de7ebc0f" />
Author
Owner

@NovaCarlili commented on GitHub (May 7, 2025):

I'm experiencing a similar issue after updating to v0.6.6. In a new chat window, clicking on the + sign and selecting Microsoft OneDrive -> Microsoft OneDrive (work/school), nothing seems to happen on the web page, but when inspecting the browser's console I get the following:
Image
I have ENABLE_ONEDRIVE_INTEGRATION set to True and ONEDRIVE_SHAREPOINT_URL configured to one of our Sharepoint sites in my environment variables.
I might be missing something here...

@NovaCarlili did you already create and configure an app registration on Azure (including redirect URL, etc)?

No I didn't, I must have missed that step. Thanks for the hint!
I admit I've been trying to integrate OneDrive a bit blindly, since I couldn't find clear documentation on this. But it's entirely possible that it exists and I simply missed it somehow. Do you know if there is some documentation about such integrations on Open WebUI's website? Because I couldn't find any, other than the Environment Variables section...

Again, thanks a lot!

<!-- gh-comment-id:2858879443 --> @NovaCarlili commented on GitHub (May 7, 2025): > > I'm experiencing a similar issue after updating to v0.6.6. In a new chat window, clicking on the + sign and selecting Microsoft OneDrive -> Microsoft OneDrive (work/school), nothing seems to happen on the web page, but when inspecting the browser's console I get the following: > > <img alt="Image" width="421" src="https://private-user-images.githubusercontent.com/170635180/440863979-0098d689-3780-4780-a3dc-bfe57d6ff458.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDY1NDkyNTAsIm5iZiI6MTc0NjU0ODk1MCwicGF0aCI6Ii8xNzA2MzUxODAvNDQwODYzOTc5LTAwOThkNjg5LTM3ODAtNDc4MC1hM2RjLWJmZTU3ZDZmZjQ1OC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwNTA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDUwNlQxNjI5MTBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kYjcxMTk0OTM3YjlhNDJlYmI3ZGQ5MjU5Njg2NGU0M2IyYjMzNTZkMzk5YzM0MzU3NjIzZjEwMDkzYjUwMTc3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.EN4ghrAeeTurihMOWsb-G0HG6-dO3z553UJm0q23pQA"> > > I have ENABLE_ONEDRIVE_INTEGRATION set to True and ONEDRIVE_SHAREPOINT_URL configured to one of our Sharepoint sites in my environment variables. > > I might be missing something here... > > [@NovaCarlili](https://github.com/NovaCarlili) did you already create and configure an app registration on Azure (including redirect URL, etc)? No I didn't, I must have missed that step. Thanks for the hint! I admit I've been trying to integrate OneDrive a bit blindly, since I couldn't find clear documentation on this. But it's entirely possible that it exists and I simply missed it somehow. Do you know if there is some documentation about such integrations on Open WebUI's website? Because I couldn't find any, other than the Environment Variables section... Again, thanks a lot!
Author
Owner

@davejohnb commented on GitHub (May 7, 2025):

@NovaCarlili Curious if—once you created the app registration in Azure—you get anywhere! Let me know.

And afaik there is no documentation for the One Drive integration. I reverse-engineered as much as I could from the code.

But I'm happy to contribute to the documentation once we get it running and understand where the (config) problem lies.

<!-- gh-comment-id:2859207259 --> @davejohnb commented on GitHub (May 7, 2025): @NovaCarlili Curious if—once you created the app registration in Azure—you get anywhere! Let me know. And afaik there is no documentation for the One Drive integration. I reverse-engineered as much as I could from the code. But I'm happy to contribute to the documentation once we get it running and understand where the (config) problem lies.
Author
Owner

@NovaCarlili commented on GitHub (May 7, 2025):

@davejohnb I did register an Azure app in Delegated mode and gave it the "Files.Read.All" permission. I couldn't find any clear answer on what the redirect URL should be so I entered it as http://localhost:8080/auth/onedrive/callback (which may very well be wrong).
I also passed my client ID to the ONEDRIVE_CLIENT_ID env variable.
I still get the same visual behavior in which nothing happens on the web page, but the browser console now shows a different error:

Image

May I ask how you managed to get further than that? I couldn't find any other env variables relevant to OneDrive in the source code, other than ENABLE_ONEDRIVE_INTEGRATION, ONEDRIVE_SHAREPOINT_URL and ONEDRIVE_CLIENT_ID.
The GoogleDrive env variables include one for an API key, but OneDrive doesn't seem to have one.

Thank a lot!

<!-- gh-comment-id:2859947815 --> @NovaCarlili commented on GitHub (May 7, 2025): @davejohnb I did register an Azure app in Delegated mode and gave it the "Files.Read.All" permission. I couldn't find any clear answer on what the redirect URL should be so I entered it as http://localhost:8080/auth/onedrive/callback (which may very well be wrong). I also passed my client ID to the ONEDRIVE_CLIENT_ID env variable. I still get the same visual behavior in which nothing happens on the web page, but the browser console now shows a different error: <img width="411" alt="Image" src="https://github.com/user-attachments/assets/8b91390d-7127-40ef-8a26-e1a2b5b39418" /> May I ask how you managed to get further than that? I couldn't find any other env variables relevant to OneDrive in the source code, other than ENABLE_ONEDRIVE_INTEGRATION, ONEDRIVE_SHAREPOINT_URL and ONEDRIVE_CLIENT_ID. The GoogleDrive env variables include one for an API key, but OneDrive doesn't seem to have one. Thank a lot!
Author
Owner

@davejohnb commented on GitHub (May 7, 2025):

@NovaCarlili I added a screenshot on top about the permissions. And as far as I got you need to create an SPA and the redirect URL will be the one where your Open WebUI instance runs on.

You just need to add the ONEDRIVE_SHAREPOINT_URL (the one that you see in the browser when you open your Sharepoint) and ONEDRIVE_CLIENT_ID (from your newly created app on Azure app registrations).

<!-- gh-comment-id:2859975080 --> @davejohnb commented on GitHub (May 7, 2025): @NovaCarlili I added a screenshot on top about the permissions. And as far as I got you need to create an SPA and the redirect URL will be the one where your Open WebUI instance runs on. You just need to add the ONEDRIVE_SHAREPOINT_URL (the one that you see in the browser when you open your Sharepoint) and ONEDRIVE_CLIENT_ID (from your newly created app on Azure app registrations).
Author
Owner

@NovaCarlili commented on GitHub (May 7, 2025):

@davejohnb Thanks for the clarification!
I just added the permissions from your screenshot to my Azure app (and granted admin consent). I also changed my ONEDRIVE_SHAREPOINT_URL variable to point to our generic Sharepoint URL (https://myorg.sharepoint.com) instead of the site specific URL I had before (https://myorg.sharepoint.com/sites/mysite).
I am still getting the same BrowserAuthError as in my last reply.
I tried creating an SPA, but my Open WebUI instance lives in a docker container (on a headless server) at http://192.168.1.22:3000, and Azure will not let me enter a URL that is not HTTPS.
I am still in the exploration phase and I haven't generated a certificate for my server yet. Do you think it is absolutely required? Or is there a way to work around that?

<!-- gh-comment-id:2860040013 --> @NovaCarlili commented on GitHub (May 7, 2025): @davejohnb Thanks for the clarification! I just added the permissions from your screenshot to my Azure app (and granted admin consent). I also changed my ONEDRIVE_SHAREPOINT_URL variable to point to our generic Sharepoint URL (https://myorg.sharepoint.com) instead of the site specific URL I had before (https://myorg.sharepoint.com/sites/mysite). I am still getting the same BrowserAuthError as in my last reply. I tried creating an SPA, but my Open WebUI instance lives in a docker container (on a headless server) at http://192.168.1.22:3000, and Azure will not let me enter a URL that is not HTTPS. I am still in the exploration phase and I haven't generated a certificate for my server yet. Do you think it is absolutely required? Or is there a way to work around that?
Author
Owner

@davejohnb commented on GitHub (May 7, 2025):

@NovaCarlili Not sure but just got this file picker showing up after creating the SPA with the correct redirect URL, so it might be necessary to generate a certificate.

I have our OWUI instance running as docker in Azure and there, the URL + certificate gets created automatically, so I didn't have to worry about that..

<!-- gh-comment-id:2860049831 --> @davejohnb commented on GitHub (May 7, 2025): @NovaCarlili Not sure but just got this file picker showing up after creating the SPA with the correct redirect URL, so it might be necessary to generate a certificate. I have our OWUI instance running as docker in Azure and there, the URL + certificate gets created automatically, so I didn't have to worry about that..
Author
Owner

@NovaCarlili commented on GitHub (May 7, 2025):

@davejohnb gotcha, I guess I'll try that then! Thanks a lot for your insight.
Just to make sure, would this be the correct redirect url format (once my certificate is issued)?
https://192.168.1.22:3000/auth/onedrive/callback

<!-- gh-comment-id:2860056332 --> @NovaCarlili commented on GitHub (May 7, 2025): @davejohnb gotcha, I guess I'll try that then! Thanks a lot for your insight. Just to make sure, would this be the correct redirect url format (once my certificate is issued)? https://192.168.1.22:3000/auth/onedrive/callback
Author
Owner

@davejohnb commented on GitHub (May 7, 2025):

@NovaCarlili Sure thing. For now I used simply my URL (without port and /auth/onedrive/callback). I just tried adding it as I was curious if that might solve my problem, but then I get an error and the file picker doesn't open anymore..

<!-- gh-comment-id:2860227260 --> @davejohnb commented on GitHub (May 7, 2025): @NovaCarlili Sure thing. For now I used simply my URL (without port and /auth/onedrive/callback). I just tried adding it as I was curious if that might solve my problem, but then I get an error and the file picker doesn't open anymore..
Author
Owner

@NovaCarlili commented on GitHub (May 7, 2025):

Interesting... I'll keep digging then. Thanks a lot! :)

<!-- gh-comment-id:2860240026 --> @NovaCarlili commented on GitHub (May 7, 2025): Interesting... I'll keep digging then. Thanks a lot! :)
Author
Owner

@mjtrangoni commented on GitHub (May 8, 2025):

The same here, fighting a little bit with the RedirectURI for the Single-Page-Application. Now it opens a new window for Sharepoint, but there are a lot of errors in the console, see,

Image

Once I refresh the page, I can see something. Once I select the file, and click there, nothing happens.

<div aria-expanded="true" tabindex="-1" style="box-sizing: border-box; min-width: 0px; min-height: 0px; flex: 0 0 auto; color: rgb(227, 227, 227); font-family: monospace; font-size: 11px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(0, 74, 119); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><span class="source-code" style="box-sizing: border-box; min-width: 0px; min-height: 0px; font-family: monospace; white-space: pre-wrap; font-size: 11px !important; line-height: 1.2;"><span class="console-message-anchor" style="box-sizing: border-box; min-width: 0px; min-height: 0px; float: right; text-align: right; max-width: 100%; margin-left: 4px;"><button class="devtools-link text-button link-style" jslog="Link; context: script-location; track: click" role="link" tabindex="-1" title="https://host/src/lib/components/chat/MessageInput.svelte:1077" style="box-sizing: border-box; min-width: 0px; min-height: 0px; font: inherit; color: rgb(168, 199, 250); text-decoration: underline; outline-offset: 2px; margin: 0px; height: unset; border: none; border-radius: 2px; padding: 0px !important; background: none !important; flex: 0 0 auto; white-space: nowrap; cursor: pointer; outline: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; word-break: break-all;"><br class="Apple-interchange-newline">MessageInput.svelte:1077</button> <devtools-icon role="button" class="resource-links console-search-icon console-ask-copilot-icon" name="edge-copilot" title="Ask Copilot: explain this error" aria-label="OneDrive Error:" tabindex="0" style="flex-grow: 0; flex-shrink: 0; display: inline-block; width: 14px; height: 14px; color: rgb(78, 161, 225); vertical-align: sub; position: relative; box-sizing: border-box; min-width: 0px; min-height: 0px; mask: url(&quot;devtools://devtools/bundled/Images/edge-copilot.svg&quot;) 50% 50% / 14px no-repeat; background-color: rgb(78, 161, 225); margin-bottom: -2px; margin-top: -1px;"><span style="display: block; width: 14px; height: 14px; background-color: currentcolor; mask: url(&quot;devtools://devtools/bundled/Images/edge-copilot.svg&quot;) 50% 50% / contain no-repeat; --icon-url: url(&quot;devtools://devtools/bundled/Images/edge-copilot.svg&quot;);"></span></devtools-icon> </span><span class="console-message-text" style="box-sizing: border-box; min-width: 0px; min-height: 0px; color: rgb(249, 222, 220) !important;">OneDrive Error: <span class="object-value-error source-code" style="box-sizing: border-box; min-width: 0px; min-height: 0px; font-family: monospace; white-space: pre-wrap; font-size: 11px !important; line-height: 1.2;"><span style="box-sizing: border-box; min-width: 0px; min-height: 0px;">SyntaxError: Unexpected token '&lt;', "&lt;!doctype "... is not valid JSON</span></span></span></span></div><div class="" role="group" style="box-sizing: border-box; min-width: 0px; min-height: 0px; flex: 0 0 auto; color: rgb(227, 227, 227); font-family: monospace; font-size: 11px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(0, 74, 119); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><span class="monospace stack-preview-container width-constrained show-hidden-rows" style="display: inline-block; width: 1288px; box-sizing: border-box; min-width: 0px; min-height: 0px; font-family: monospace; font-size: 11px !important;">
  | Ht | @ | MessageInput.svelte:1077
-- | -- | -- | --
  | await in Ht |   |  
  | R | @ | InputMenu.svelte:335

</span></div>

mmm and about the callback URI, it seems at least for me, it is not static.

<!-- gh-comment-id:2862680737 --> @mjtrangoni commented on GitHub (May 8, 2025): The same here, fighting a little bit with the RedirectURI for the Single-Page-Application. Now it opens a new window for Sharepoint, but there are a lot of errors in the console, see, <img width="595" alt="Image" src="https://github.com/user-attachments/assets/05d21483-cca9-4019-a4a9-4c057dbe8fc8" /> Once I refresh the page, I can see something. Once I select the file, and click there, nothing happens. ```html <div aria-expanded="true" tabindex="-1" style="box-sizing: border-box; min-width: 0px; min-height: 0px; flex: 0 0 auto; color: rgb(227, 227, 227); font-family: monospace; font-size: 11px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(0, 74, 119); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><span class="source-code" style="box-sizing: border-box; min-width: 0px; min-height: 0px; font-family: monospace; white-space: pre-wrap; font-size: 11px !important; line-height: 1.2;"><span class="console-message-anchor" style="box-sizing: border-box; min-width: 0px; min-height: 0px; float: right; text-align: right; max-width: 100%; margin-left: 4px;"><button class="devtools-link text-button link-style" jslog="Link; context: script-location; track: click" role="link" tabindex="-1" title="https://host/src/lib/components/chat/MessageInput.svelte:1077" style="box-sizing: border-box; min-width: 0px; min-height: 0px; font: inherit; color: rgb(168, 199, 250); text-decoration: underline; outline-offset: 2px; margin: 0px; height: unset; border: none; border-radius: 2px; padding: 0px !important; background: none !important; flex: 0 0 auto; white-space: nowrap; cursor: pointer; outline: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; word-break: break-all;"><br class="Apple-interchange-newline">MessageInput.svelte:1077</button> <devtools-icon role="button" class="resource-links console-search-icon console-ask-copilot-icon" name="edge-copilot" title="Ask Copilot: explain this error" aria-label="OneDrive Error:" tabindex="0" style="flex-grow: 0; flex-shrink: 0; display: inline-block; width: 14px; height: 14px; color: rgb(78, 161, 225); vertical-align: sub; position: relative; box-sizing: border-box; min-width: 0px; min-height: 0px; mask: url(&quot;devtools://devtools/bundled/Images/edge-copilot.svg&quot;) 50% 50% / 14px no-repeat; background-color: rgb(78, 161, 225); margin-bottom: -2px; margin-top: -1px;"><span style="display: block; width: 14px; height: 14px; background-color: currentcolor; mask: url(&quot;devtools://devtools/bundled/Images/edge-copilot.svg&quot;) 50% 50% / contain no-repeat; --icon-url: url(&quot;devtools://devtools/bundled/Images/edge-copilot.svg&quot;);"></span></devtools-icon> </span><span class="console-message-text" style="box-sizing: border-box; min-width: 0px; min-height: 0px; color: rgb(249, 222, 220) !important;">OneDrive Error: <span class="object-value-error source-code" style="box-sizing: border-box; min-width: 0px; min-height: 0px; font-family: monospace; white-space: pre-wrap; font-size: 11px !important; line-height: 1.2;"><span style="box-sizing: border-box; min-width: 0px; min-height: 0px;">SyntaxError: Unexpected token '&lt;', "&lt;!doctype "... is not valid JSON</span></span></span></span></div><div class="" role="group" style="box-sizing: border-box; min-width: 0px; min-height: 0px; flex: 0 0 auto; color: rgb(227, 227, 227); font-family: monospace; font-size: 11px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(0, 74, 119); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><span class="monospace stack-preview-container width-constrained show-hidden-rows" style="display: inline-block; width: 1288px; box-sizing: border-box; min-width: 0px; min-height: 0px; font-family: monospace; font-size: 11px !important;">   | Ht | @ | MessageInput.svelte:1077 -- | -- | -- | --   | await in Ht |   |     | R | @ | InputMenu.svelte:335 </span></div> ``` mmm and about the callback URI, it seems at least for me, it is not static.
Author
Owner

@hurxxxx commented on GitHub (May 8, 2025):

I created a new organization to test and confirm the setup. Below are the steps I followed to successfully complete the configuration. Please refer to this guide:


Prerequisites

  • I hosted Open-WebUI on my own domain and set up an SSL certificate.
  • SSL is not required when testing on localhost.

.env Environment Variables

ONEDRIVE_CLIENT_ID=521ada3e-6154-4a35-xxxx-xxxxxxxxxx
ONEDRIVE_SHAREPOINT_URL=https://yourdomain-my.sharepoint.com
# or
ONEDRIVE_SHAREPOINT_URL=https://yourdomain.sharepoint.com

Azure Portal Configuration

  1. Go to Microsoft Entra IDView

  2. Open App registrations

    • Click New registration
    • Enter a name
    • Choose:
      Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)
    • Add a Redirect URI (optional)
      → Type: Single-page application (SPA)
      → Value: your domain (e.g., https://yourdomain.com)
    • Click Register
  3. After registration, go into your app:

    • Under Branding & properties, perform Publisher domain verification
    • In Authentication, add localhost and any development domains as Single-page application redirect URIs
    • Set up necessary API permissions
Image
<!-- gh-comment-id:2863260749 --> @hurxxxx commented on GitHub (May 8, 2025): I created a new organization to test and confirm the setup. Below are the steps I followed to successfully complete the configuration. Please refer to this guide: --- ## Prerequisites * I hosted Open-WebUI on my own domain and set up an SSL certificate. * SSL is **not** required when testing on `localhost`. --- ## .env Environment Variables ```env ONEDRIVE_CLIENT_ID=521ada3e-6154-4a35-xxxx-xxxxxxxxxx ONEDRIVE_SHAREPOINT_URL=https://yourdomain-my.sharepoint.com # or ONEDRIVE_SHAREPOINT_URL=https://yourdomain.sharepoint.com ``` --- ## Azure Portal Configuration 1. Go to **Microsoft Entra ID** → **View** 2. Open **App registrations** * Click **New registration** * Enter a name * Choose: `Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)` * Add a **Redirect URI (optional)** → Type: `Single-page application (SPA)` → Value: your domain (e.g., `https://yourdomain.com`) * Click **Register** 3. After registration, go into your app: * Under **Branding & properties**, perform **Publisher domain verification** * In **Authentication**, add `localhost` and any development domains as **Single-page application** redirect URIs * Set up necessary **API permissions** <img width="1620" alt="Image" src="https://github.com/user-attachments/assets/e849a9f7-bbe2-4088-816a-55603c1dd266" />
Author
Owner

@davejohnb commented on GitHub (May 8, 2025):

@hurxxxx Absolutely amazing, thanks for the guide. I can already see I was missing a few steps at the end. Will test tonight and provide feedback. Thanks for your support ♡

<!-- gh-comment-id:2863839352 --> @davejohnb commented on GitHub (May 8, 2025): @hurxxxx Absolutely amazing, thanks for the guide. I can already see I was missing a few steps at the end. Will test tonight and provide feedback. Thanks for your support ♡
Author
Owner

@hurxxxx commented on GitHub (May 9, 2025):

@davejohnb #13703
There have been changes related to single-tenant organization users in the development branch. Please take note.

<!-- gh-comment-id:2864726141 --> @hurxxxx commented on GitHub (May 9, 2025): @davejohnb #13703 There have been changes related to single-tenant organization users in the development branch. Please take note.
Author
Owner

@davejohnb commented on GitHub (May 9, 2025):

@hurxxxx Just a quick feedback (cc @NovaCarlili ) I got it running with your instructions. The missing part for me was some app permissions. After setting them I had to wait / clear caches to make it run. Thanks a lot for your help.

Does it make sense to propose changes to the documentation on that end or no need?

<!-- gh-comment-id:2866188366 --> @davejohnb commented on GitHub (May 9, 2025): @hurxxxx Just a quick feedback (cc @NovaCarlili ) I got it running with your instructions. The missing part for me was some app permissions. After setting them I had to wait / clear caches to make it run. Thanks a lot for your help. Does it make sense to propose changes to the documentation on that end or no need?
Author
Owner

@NovaCarlili commented on GitHub (May 9, 2025):

@davejohnb Thanks for the feedback! I haven't gotten around to work out my https issue yet, but I feel like this thread has a lot of relevant info to get the OneDrive file picker up and running once that's done.

<!-- gh-comment-id:2866518244 --> @NovaCarlili commented on GitHub (May 9, 2025): @davejohnb Thanks for the feedback! I haven't gotten around to work out my https issue yet, but I feel like this thread has a lot of relevant info to get the OneDrive file picker up and running once that's done.
Author
Owner

@hurxxxx commented on GitHub (May 9, 2025):

@davejohnb Updates and PRs to the documentation are always welcome! Thanks for bringing it up.

<!-- gh-comment-id:2866633043 --> @hurxxxx commented on GitHub (May 9, 2025): @davejohnb Updates and PRs to the documentation are always welcome! Thanks for bringing it up.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#103938