Microsoft SharePoint Integration
Automatically sync and search documents from your SharePoint environment.
Supported Sources
- SharePoint - Sites, document libraries, and lists
> Note: OneDrive, Teams, and Outlook integrations are on our roadmap. Currently, only SharePoint is supported.
Setup
1. Azure AD App Registration
- Go to Azure Portal > App Registrations
- Create new registration
- Add required permissions:
- Sites.Read.All
- User.Read
- Generate client secret
- Grant admin consent
2. Configure in LH42
- Go to Settings > Integrations > Microsoft 365
- Enter Azure AD credentials:
- Tenant ID
- Client ID
- Client Secret
- Click "Connect"
3. Select SharePoint Sites
Choose which SharePoint sites to sync:
python
client.integrations.microsoft.configure({
"sources": [
{"type": "sharepoint_site", "id": "site-id"},
{"type": "sharepoint_library", "site_id": "site-id", "library_id": "lib-id"}
]
})Sync Options
| Option | Description |
|---|---|
full_sync | Re-index all documents |
incremental | Only new/modified files |
schedule | Cron expression for auto-sync |
python
client.integrations.microsoft.sync({
"mode": "incremental",
"schedule": "0 */4 * * *" # Every 4 hours
})File Type Support
- Documents: .docx, .doc, .pdf, .txt, .rtf
- Spreadsheets: .xlsx, .xls, .csv
- Presentations: .pptx, .ppt
- Other: .md, .html
Permissions
LH42 respects SharePoint permissions:
- Users only see documents they have access to in SharePoint
- Permission changes sync within 1 hour
Monitoring
Track sync status:
python
status = client.integrations.microsoft.status()
print(f"Last sync: {status.last_sync}")
print(f"Documents indexed: {status.document_count}")
print(f"Errors: {status.error_count}")Roadmap
The following Microsoft 365 integrations are planned for future releases:
- OneDrive - Personal and shared drives
- Teams - Channel files and conversations
- Outlook - Emails and attachments