[GH-ISSUE #17929] feat: Update OneDrive file picker pivots and enable search #57109

Closed
opened 2026-05-05 20:36:32 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @selenecodes on GitHub (Sep 30, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17929

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

Right now you're not able to search through your files in OneDrive and the "My Organization" panel is hidden by default.

Relevant file:
4d7fddaf7e/src/lib/utils/onedrive-file-picker.ts (L206-L211)

Desired Solution you'd like

I would like to update the getPickerParams function to enable search. If the user is using oneDrive business I also want to enable the "My Organization" pivot

function getPickerParams(): PickerParams {
	const channelId = uuidv4();
	const config = OneDriveConfig.getInstance();

	const params: PickerParams = {
		sdk: '8.0',
		entry: {
			oneDrive: {}
		},
		authentication: {},
		messaging: {
			origin: window?.location?.origin || '',
			channelId
		},
		search: {
			enabled: true
		},
		typesAndSources: {
			mode: 'files',
			pivots: {
				oneDrive: true,
				recent: true,
				myOrganization: config.getAuthorityType() === "organizations"
			}
		}
	};

	// For personal accounts, set files object in oneDrive
	if (config.getAuthorityType() !== 'organizations') {
		params.entry.oneDrive = { files: {} };
	}

	return params;
}

Alternatives Considered

No response

Additional Context

Microsoft file picker configuration schema: https://learn.microsoft.com/en-us/onedrive/developer/controls/file-pickers/v8-schema?view=odsp-graph-online

Originally created by @selenecodes on GitHub (Sep 30, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/17929 ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description Right now you're not able to search through your files in OneDrive and the "My Organization" panel is hidden by default. **Relevant file:** https://github.com/open-webui/open-webui/blob/4d7fddaf7e434bf59fdd879ef11d712a503b7863/src/lib/utils/onedrive-file-picker.ts#L206-L211 ### Desired Solution you'd like I would like to update the `getPickerParams` function to enable search. If the user is using oneDrive business I also want to enable the "My Organization" pivot ```typescript function getPickerParams(): PickerParams { const channelId = uuidv4(); const config = OneDriveConfig.getInstance(); const params: PickerParams = { sdk: '8.0', entry: { oneDrive: {} }, authentication: {}, messaging: { origin: window?.location?.origin || '', channelId }, search: { enabled: true }, typesAndSources: { mode: 'files', pivots: { oneDrive: true, recent: true, myOrganization: config.getAuthorityType() === "organizations" } } }; // For personal accounts, set files object in oneDrive if (config.getAuthorityType() !== 'organizations') { params.entry.oneDrive = { files: {} }; } return params; } ``` ### Alternatives Considered _No response_ ### Additional Context Microsoft file picker configuration schema: https://learn.microsoft.com/en-us/onedrive/developer/controls/file-pickers/v8-schema?view=odsp-graph-online
Author
Owner

@selenecodes commented on GitHub (Sep 30, 2025):

What this would look like:
Image

Old/current version:

Image
<!-- gh-comment-id:3352501812 --> @selenecodes commented on GitHub (Sep 30, 2025): **What this would look like:** <img width="1465" height="1011" alt="Image" src="https://github.com/user-attachments/assets/29d1f589-4e0f-4ecc-a2ac-d278a138bfaa" /> **Old/current version:** <img width="1328" height="978" alt="Image" src="https://github.com/user-attachments/assets/de3e2f50-fcde-4660-9830-dcd35aa7f549" />
Author
Owner

@selenecodes commented on GitHub (Sep 30, 2025):

I have looked into adding the shared, sharedLibraries, site pivots as well however those either don't do anything or (in the case of the site pivot) actively remove other options (like searching by People/Meetings)

<!-- gh-comment-id:3352506998 --> @selenecodes commented on GitHub (Sep 30, 2025): I have looked into adding the `shared`, `sharedLibraries`, `site` pivots as well however those either don't do anything or (in the case of the `site` pivot) actively remove other options (like searching by People/Meetings)
Author
Owner

@selenecodes commented on GitHub (Oct 1, 2025):

Closing issue since PR was merged

<!-- gh-comment-id:3356542350 --> @selenecodes commented on GitHub (Oct 1, 2025): Closing issue since PR was merged
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#57109