From acf01c38254892d0ec6e57385681127191fe601d Mon Sep 17 00:00:00 2001 From: kirtimanmishrazipstack Date: Fri, 10 Apr 2026 20:49:17 +0530 Subject: [PATCH 1/4] sharepoint tenent ui --- .../input-output/add-source/AddSource.jsx | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/input-output/add-source/AddSource.jsx b/frontend/src/components/input-output/add-source/AddSource.jsx index 9cdd757b8b..b34481e5f5 100644 --- a/frontend/src/components/input-output/add-source/AddSource.jsx +++ b/frontend/src/components/input-output/add-source/AddSource.jsx @@ -1,3 +1,5 @@ +import { getDefaultFormState } from "@rjsf/utils"; +import validator from "@rjsf/validator-ajv8"; import { Typography } from "antd"; import PropTypes from "prop-types"; import { useEffect, useMemo, useState } from "react"; @@ -121,12 +123,22 @@ function AddSource({ axiosPrivate(requestOptions) .then((res) => { const data = res?.data; - setFormData(metadata || {}); + const jsonSchema = isLLMWPaidSchema + ? transformLlmWhispererJsonSchema(data?.json_schema || {}) + : data?.json_schema || {}; - if (isLLMWPaidSchema) { - setSpec(transformLlmWhispererJsonSchema(data?.json_schema || {})); + setSpec(jsonSchema); + + if (metadata && Object.keys(metadata).length > 0) { + setFormData(metadata); } else { - setSpec(data?.json_schema || {}); + const defaults = getDefaultFormState( + validator, + jsonSchema, + {}, + jsonSchema, + ); + setFormData(defaults || {}); } if (data?.oauth) { From 6aee877f02624631a5887adfbe182b1c5eba5fd3 Mon Sep 17 00:00:00 2001 From: kirtimanmishrazipstack Date: Mon, 13 Apr 2026 18:37:59 +0530 Subject: [PATCH 2/4] sharepoint tenent ui --- .../filesystems/sharepoint/static/json_schema.json | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/unstract/connectors/src/unstract/connectors/filesystems/sharepoint/static/json_schema.json b/unstract/connectors/src/unstract/connectors/filesystems/sharepoint/static/json_schema.json index f9555f5da2..d83f84c8ae 100644 --- a/unstract/connectors/src/unstract/connectors/filesystems/sharepoint/static/json_schema.json +++ b/unstract/connectors/src/unstract/connectors/filesystems/sharepoint/static/json_schema.json @@ -10,12 +10,6 @@ "default": "SharePoint / OneDrive Connector", "description": "A friendly name to identify this connector" }, - "is_personal": { - "type": "boolean", - "title": "Personal Account", - "default": false, - "description": "Enable for OneDrive Personal (consumer Microsoft accounts). Leave disabled for SharePoint or OneDrive for Business (work/school accounts)." - }, "site_url": { "type": "string", "title": "Site URL", @@ -27,7 +21,7 @@ }, "drive_id": { "type": "string", - "title": "Drive ID (Optional)", + "title": "Drive ID", "description": "Specific Drive/Document Library ID. Leave empty to use the default drive." }, "auth_type": { From 139293333ff54c4403d7e3d19a151c98a4f4f914 Mon Sep 17 00:00:00 2001 From: kirtimanmishrazipstack Date: Mon, 13 Apr 2026 19:04:04 +0530 Subject: [PATCH 3/4] sharepoint tenent ui docs --- frontend/src/components/input-output/add-source/AddSource.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/input-output/add-source/AddSource.jsx b/frontend/src/components/input-output/add-source/AddSource.jsx index b34481e5f5..e55c9b529b 100644 --- a/frontend/src/components/input-output/add-source/AddSource.jsx +++ b/frontend/src/components/input-output/add-source/AddSource.jsx @@ -154,7 +154,7 @@ function AddSource({ .finally(() => { setIsLoading(false); }); - }, [selectedSourceId]); + }, [selectedSourceId, isLLMWPaidSchema]); useEffect(() => { if (editItemId?.length && metadata && Object.keys(metadata)?.length) { From 0de052d54f48d36dd40f78f6ec36db247b0817fe Mon Sep 17 00:00:00 2001 From: kirtimanmishrazipstack Date: Mon, 13 Apr 2026 19:37:46 +0530 Subject: [PATCH 4/4] sharepoint tenent site_url error handling --- .../connectors/filesystems/sharepoint/sharepoint.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/unstract/connectors/src/unstract/connectors/filesystems/sharepoint/sharepoint.py b/unstract/connectors/src/unstract/connectors/filesystems/sharepoint/sharepoint.py index 7491fbf7a7..3eacdac30d 100644 --- a/unstract/connectors/src/unstract/connectors/filesystems/sharepoint/sharepoint.py +++ b/unstract/connectors/src/unstract/connectors/filesystems/sharepoint/sharepoint.py @@ -170,9 +170,11 @@ def _get_onedrive_drive(self, ctx: Any) -> Any: if self.client_secret: if not self.user_email: error_msg = ( - "OneDrive client credentials require user email. Provide either \n" - "- user_email (e.g., user@company.onmicrosoft.com) \n" - "- OR use OAuth with access_token instead." + "No Site URL provided. " + "To access a SharePoint site, provide the Site URL " + "(e.g., https://contoso.sharepoint.com/sites/mysite). " + "To access OneDrive, provide the User Email " + "(e.g., user@company.onmicrosoft.com)." ) raise ConnectorError( error_msg,