[GH-ISSUE #13345] feat: OneDrive for business integration #136618

Closed
opened 2026-05-25 04:52:31 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @Andrew-Stubbs on GitHub (Apr 30, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/13345

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

I was attempting to integrate open-webui with OneDrive for Business, and was surprised to see only a single configuration parameter (ONEDRIVE_CLIENT_ID) required for the configuration.

Looking around the documentation, google, etc. I was unable to get it working with my enterprise setup, trying an application client id, secret id, tenant id, or application secret, all displayed the same error:

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

Looking into the devtools, I noticed that the MSAL params are constructed like so:

		const msalParams = {
			auth: {
				authority: 'https://login.microsoftonline.com/consumers',
				clientId: CLIENT_ID
			}
		};

Whereas every MSAL integration I have seen to date has at least one extra parameter for the authority, and usually a redirectUrl (not sure if the latter would be required), e.g.,:

export const msalConfig: Configuration = {
    auth: {
        clientId: "CLIENT_ID",
        authority: `https://login.microsoftonline.com/${TENANT_ID}`,
        redirectUri: "REDIRECT_ID",
    }
};

I believe the issue is that at present the OneDrive integration is only capable of integrating with the standard consumer OneDrive instance, and not an enterprise tenant.

I have not looked any further into whether the ability to configure the tenant would be sufficient for OneDrive for Business to work alongside standard OneDrive, but believe it would be.

Desired Solution you'd like

An additional environment variable added to the configuration for ONEDRIVE_AUTHORITY or ONEDRIVE_TENANT_ID and then injected into the onedrive-file-picker.ts file in the same way as ONEDRIVE_CLIENT_ID and passed into the msalParams object for MSAL initialisation

Alternatives Considered

No response

Additional Context

No response

Originally created by @Andrew-Stubbs on GitHub (Apr 30, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/13345 ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description I was attempting to integrate open-webui with OneDrive for Business, and was surprised to see only a single configuration parameter (`ONEDRIVE_CLIENT_ID`) required for the configuration. Looking around the documentation, google, etc. I was unable to get it working with my enterprise setup, trying an application client id, secret id, tenant id, or application secret, all displayed the same error: > ![Image](https://github.com/user-attachments/assets/f60b8acb-88e4-48e8-80f4-7e01eac20d50) **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. Looking into the devtools, I noticed that the MSAL params are constructed like so: ``` const msalParams = { auth: { authority: 'https://login.microsoftonline.com/consumers', clientId: CLIENT_ID } }; ``` Whereas every MSAL integration I have seen to date has at least one extra parameter for the `authority`, and usually a `redirectUrl` (not sure if the latter would be required), e.g.,: ``` export const msalConfig: Configuration = { auth: { clientId: "CLIENT_ID", authority: `https://login.microsoftonline.com/${TENANT_ID}`, redirectUri: "REDIRECT_ID", } }; ``` I believe the issue is that at present the OneDrive integration is only capable of integrating with the standard consumer OneDrive instance, and not an enterprise tenant. I have not looked any further into whether the ability to configure the tenant would be sufficient for OneDrive for Business to work alongside standard OneDrive, but believe it would be. ### Desired Solution you'd like An additional environment variable added to the configuration for `ONEDRIVE_AUTHORITY` or `ONEDRIVE_TENANT_ID` and then injected into the `onedrive-file-picker.ts` file in the same way as `ONEDRIVE_CLIENT_ID` and passed into the `msalParams` object for MSAL initialisation ### Alternatives Considered _No response_ ### Additional Context _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#136618