[PR #1623] [MERGED] feat(datasource/sharepoint): allow finding document libraries by groups #1994

Closed
opened 2026-02-16 11:15:48 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-official-plugins/pull/1623
Author: @kurokobo
Created: 8/31/2025
Status: Merged
Merged: 9/1/2025
Merged by: @crazywoola

Base: feat/datasourceHead: sp_group


📝 Commits (5)

  • 5f50aeb fix: rename files
  • df7d965 refactor: move functions to utils, rename datasource
  • 61f6089 feat: add datasource with groups
  • 565ab75 docs: update docs
  • bf36f08 docs: add last updated date

📊 Changes

11 files changed (+508 additions, -413 deletions)

View changed files

📝 datasources/sharepoint_datasource/PRIVACY.md (+1 -0)
📝 datasources/sharepoint_datasource/README.md (+9 -1)
datasources/sharepoint_datasource/datasources/docs_in_group.py (+100 -0)
datasources/sharepoint_datasource/datasources/docs_in_group.yaml (+20 -0)
datasources/sharepoint_datasource/datasources/docs_in_site.py (+100 -0)
datasources/sharepoint_datasource/datasources/docs_in_site.yaml (+20 -0)
datasources/sharepoint_datasource/datasources/sharepoint.py (+0 -385)
datasources/sharepoint_datasource/datasources/sharepoint.yaml (+0 -22)
datasources/sharepoint_datasource/datasources/utils/graph_utils.py (+254 -0)
📝 datasources/sharepoint_datasource/manifest.yaml (+2 -2)
📝 datasources/sharepoint_datasource/provider/sharepoint.yaml (+2 -3)

📄 Description

Related Issues or Context

This is for feat/datasource branch.

The current SharePoint datasource supports only the sites under /sites in graph API.
However, the users can have more sites per groups (almost equals to teams in Microsoft Teams) under /groups/{id}/sites API.

This PR changes:

  • Rename existing SharePoint datasource to Documents in Site
  • Add new datasource Documents in Group
  • Unified the functions since only the endpoints are different and most of the internal processing is the same for both datasource.
Datasources By site By group
image image image image image

This PR contains Changes to Non-LLM Models Plugin

  • I have Run Comprehensive Tests Relevant to My Changes

Version Control (Any Changes to the Plugin Will Require Bumping the Version)

  • I have Bumped Up the Version in Manifest.yaml (Top-Level Version Field, Not in Meta Section)

Dify Plugin SDK Version

  • I have Ensured dify_plugin>=0.3.0,<0.5.0 is in requirements.txt (SDK docs)

Environment Verification (If Any Code Changes)

Local Deployment Environment

  • Dify Version is: feat/rag-2, I have Tested My Changes on Local Deployment Dify with a Clean Environment That Matches the Production Configuration.

SaaS Environment

  • I have Tested My Changes on cloud.dify.ai with a Clean Environment That Matches the Production Configuration

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-official-plugins/pull/1623 **Author:** [@kurokobo](https://github.com/kurokobo) **Created:** 8/31/2025 **Status:** ✅ Merged **Merged:** 9/1/2025 **Merged by:** [@crazywoola](https://github.com/crazywoola) **Base:** `feat/datasource` ← **Head:** `sp_group` --- ### 📝 Commits (5) - [`5f50aeb`](https://github.com/langgenius/dify-official-plugins/commit/5f50aeb3482fa412f47adde9e7100284fcf8bd51) fix: rename files - [`df7d965`](https://github.com/langgenius/dify-official-plugins/commit/df7d9657458809cfd08ffd44f5a374f8492f830b) refactor: move functions to utils, rename datasource - [`61f6089`](https://github.com/langgenius/dify-official-plugins/commit/61f60892ad2ac69e56bb4818cd5494c6901f0687) feat: add datasource with groups - [`565ab75`](https://github.com/langgenius/dify-official-plugins/commit/565ab750ca7d2f974d85ef9277053c2a1eb4b783) docs: update docs - [`bf36f08`](https://github.com/langgenius/dify-official-plugins/commit/bf36f08c34af46284c1322d52ddc57fa71d9c206) docs: add last updated date ### 📊 Changes **11 files changed** (+508 additions, -413 deletions) <details> <summary>View changed files</summary> 📝 `datasources/sharepoint_datasource/PRIVACY.md` (+1 -0) 📝 `datasources/sharepoint_datasource/README.md` (+9 -1) ➕ `datasources/sharepoint_datasource/datasources/docs_in_group.py` (+100 -0) ➕ `datasources/sharepoint_datasource/datasources/docs_in_group.yaml` (+20 -0) ➕ `datasources/sharepoint_datasource/datasources/docs_in_site.py` (+100 -0) ➕ `datasources/sharepoint_datasource/datasources/docs_in_site.yaml` (+20 -0) ➖ `datasources/sharepoint_datasource/datasources/sharepoint.py` (+0 -385) ➖ `datasources/sharepoint_datasource/datasources/sharepoint.yaml` (+0 -22) ➕ `datasources/sharepoint_datasource/datasources/utils/graph_utils.py` (+254 -0) 📝 `datasources/sharepoint_datasource/manifest.yaml` (+2 -2) 📝 `datasources/sharepoint_datasource/provider/sharepoint.yaml` (+2 -3) </details> ### 📄 Description ## Related Issues or Context ✨ This is for `feat/datasource` branch. The current SharePoint datasource supports only the sites under `/sites` in graph API. However, the users can have more sites per groups (almost equals to teams in Microsoft Teams) under `/groups/{id}/sites` API. This PR changes: - Rename existing `SharePoint` datasource to `Documents in Site` - Add new datasource `Documents in Group` - Unified the functions since only the endpoints are different and most of the internal processing is the same for both datasource. | Datasources | By site | By group | |-|-|-| | <img width="691" height="564" alt="image" src="https://github.com/user-attachments/assets/a3ac38ee-6e7f-4890-9cf9-9225189f2f22" /> | <img width="746" height="367" alt="image" src="https://github.com/user-attachments/assets/ad9eb3c7-87a1-43c2-b3b0-1765b318233e" /> <img width="729" height="661" alt="image" src="https://github.com/user-attachments/assets/dc0ec327-9b32-4edb-9fff-296a7ebe5e4b" /> | <img width="717" height="550" alt="image" src="https://github.com/user-attachments/assets/f843c391-6201-42d5-b3b3-2e480f0f7610" /> <img width="743" height="650" alt="image" src="https://github.com/user-attachments/assets/7ece3608-e342-49cc-8e73-6d8b49be2895" /> | ## This PR contains Changes to *Non-LLM Models Plugin* - [x] I have Run Comprehensive Tests Relevant to My Changes <!-- 📷 Include Screenshots/Videos Demonstrating the Fix, New Feature, or the Behavior Before/After Breaking Changes. --> ## Version Control (Any Changes to the Plugin Will Require Bumping the Version) - [x] I have Bumped Up the Version in Manifest.yaml (Top-Level `Version` Field, Not in Meta Section) ## Dify Plugin SDK Version - [ ] I have Ensured `dify_plugin>=0.3.0,<0.5.0` is in requirements.txt ([SDK docs](https://github.com/langgenius/dify-plugin-sdks/blob/main/python/README.md)) ## Environment Verification (If Any Code Changes) <!-- ⚠️ NOTE: At Least One Environment Must Be Tested. --> ### Local Deployment Environment - [x] Dify Version is: `feat/rag-2`, I have Tested My Changes on Local Deployment Dify with a Clean Environment That Matches the Production Configuration. <!-- - Python Virtual Env Matching Manifest.yaml & requirements.txt - No Breaking Changes in Dify That May Affect the Testing Result --> ### SaaS Environment - [ ] I have Tested My Changes on cloud.dify.ai with a Clean Environment That Matches the Production Configuration <!-- - Python Virtual Env Matching Manifest.yaml & requirements.txt --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 11:15:48 -05:00
yindo closed this issue 2026-02-16 11:15:48 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#1994