Skip to content

MAIT-119: Add SharePoint connector config and docs#28

Open
acikabubo wants to merge 1 commit intomainfrom
MAIT-119-sharepoint-connector
Open

MAIT-119: Add SharePoint connector config and docs#28
acikabubo wants to merge 1 commit intomainfrom
MAIT-119-sharepoint-connector

Conversation

@acikabubo
Copy link
Copy Markdown
Contributor

Summary

  • Adds SharePoint connector documentation to README
  • Supports file mode (DRIVE) and page mode (PAGE)
  • Only secrets and schedule use env vars; structural config is hardcoded in config.yaml
  • Updates config.yaml.example and .env.rag.example

Related

WikiTeq/rag-of-all-trades#41

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 6, 2026

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added SharePoint Connector for ingesting documents from SharePoint document libraries and site pages using Microsoft Entra ID authentication.
    • Supports both file and page content modes with configurable folder targeting and recursive ingestion options.
  • Documentation

    • Added comprehensive SharePoint Connector configuration guide to README with setup examples and required environment variables.

Walkthrough

Added SharePoint connector configuration examples to three files: environment variable definitions in .env.rag.example, usage documentation in README.md describing authentication and operational modes, and YAML configuration template in config.yaml.example showing OAuth credentials, site selection, content scope, and scheduling options.

Changes

Cohort / File(s) Summary
Environment Configuration
.env.rag.example
Added commented SharePoint connector environment variables: SHAREPOINT1_CLIENT_ID, SHAREPOINT1_CLIENT_SECRET, SHAREPOINT1_TENANT_ID, and SHAREPOINT1_SCHEDULES for OAuth credentials and scheduling configuration.
Documentation
README.md
Added SharePoint Connector section documenting ingestion from document libraries and site pages, including authentication via Microsoft Entra ID, operational modes (file vs page), configuration options, and connector-level settings.
YAML Configuration Template
config.yaml.example
Added commented sharepoint source configuration block with OAuth credentials, site selection parameters, folder targeting, content type scope, recursion control, and schedule definitions parameterized via environment variables.
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding SharePoint connector configuration and documentation. It is specific and directly reflects the changeset.
Description check ✅ Passed The description is directly related to the changeset, providing a clear summary of changes including SharePoint connector documentation, supported modes, and updated configuration files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@README.md`:
- Around line 262-281: The README shows a second connector named "sharepoint2"
but the .env.rag snippet only defines SHAREPOINT1_* variables; update the docs
to either add matching SHAREPOINT2_* placeholders (SHAREPOINT2_CLIENT_ID,
SHAREPOINT2_CLIENT_SECRET, SHAREPOINT2_TENANT_ID, SHAREPOINT2_SCHEDULES) in the
env example to align with the sharepoint2 config, or add a clear note near the
.env.rag snippet stating it demonstrates only SHAREPOINT1 and additional
connectors like sharepoint2 require analogous SHAREPOINT2_* entries; reference
the "sharepoint2" connector name and the SHAREPOINT2_* variable names so readers
can find and fix the mismatch.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 14495ba8-65de-4a3a-9763-9671f829aafa

📥 Commits

Reviewing files that changed from the base of the PR and between feeaef0 and b7a5bc6.

📒 Files selected for processing (3)
  • .env.rag.example
  • README.md
  • config.yaml.example

Comment thread README.md
Comment on lines +262 to +281
# Loading SharePoint site pages
- type: "sharepoint"
name: "sharepoint2"
config:
client_id: "${SHAREPOINT2_CLIENT_ID}"
client_secret: "${SHAREPOINT2_CLIENT_SECRET}"
tenant_id: "${SHAREPOINT2_TENANT_ID}"
sharepoint_site_name: "TeamSite"
sharepoint_type: "page"
schedules: "${SHAREPOINT2_SCHEDULES}"
```

```dotenv
# .env.rag

SHAREPOINT1_CLIENT_ID=your-azure-app-client-id
SHAREPOINT1_CLIENT_SECRET=your-azure-app-client-secret
SHAREPOINT1_TENANT_ID=your-azure-tenant-id
SHAREPOINT1_SCHEDULES=3600
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Align env snippet with the second connector example.

This section introduces sharepoint2 config but the .env.rag snippet only shows SHAREPOINT1_*. Please either add SHAREPOINT2_* placeholders or explicitly state the snippet is single-connector only.

📘 Suggested doc patch
 SHAREPOINT1_CLIENT_ID=your-azure-app-client-id
 SHAREPOINT1_CLIENT_SECRET=your-azure-app-client-secret
 SHAREPOINT1_TENANT_ID=your-azure-tenant-id
 SHAREPOINT1_SCHEDULES=3600
+# Optional second SharePoint connector
+# SHAREPOINT2_CLIENT_ID=your-azure-app-client-id-2
+# SHAREPOINT2_CLIENT_SECRET=your-azure-app-client-secret-2
+# SHAREPOINT2_TENANT_ID=your-azure-tenant-id-2
+# SHAREPOINT2_SCHEDULES=3600
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Loading SharePoint site pages
- type: "sharepoint"
name: "sharepoint2"
config:
client_id: "${SHAREPOINT2_CLIENT_ID}"
client_secret: "${SHAREPOINT2_CLIENT_SECRET}"
tenant_id: "${SHAREPOINT2_TENANT_ID}"
sharepoint_site_name: "TeamSite"
sharepoint_type: "page"
schedules: "${SHAREPOINT2_SCHEDULES}"
```
```dotenv
# .env.rag
SHAREPOINT1_CLIENT_ID=your-azure-app-client-id
SHAREPOINT1_CLIENT_SECRET=your-azure-app-client-secret
SHAREPOINT1_TENANT_ID=your-azure-tenant-id
SHAREPOINT1_SCHEDULES=3600
```
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 262 - 281, The README shows a second connector named
"sharepoint2" but the .env.rag snippet only defines SHAREPOINT1_* variables;
update the docs to either add matching SHAREPOINT2_* placeholders
(SHAREPOINT2_CLIENT_ID, SHAREPOINT2_CLIENT_SECRET, SHAREPOINT2_TENANT_ID,
SHAREPOINT2_SCHEDULES) in the env example to align with the sharepoint2 config,
or add a clear note near the .env.rag snippet stating it demonstrates only
SHAREPOINT1 and additional connectors like sharepoint2 require analogous
SHAREPOINT2_* entries; reference the "sharepoint2" connector name and the
SHAREPOINT2_* variable names so readers can find and fix the mismatch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant