# SharePoint Connector - Technical Manual

The SharePoint Connector is a Node.js-based service that integrates Microsoft SharePoint Online with the Unique platform. It periodically scans configured SharePoint sites, downloads flagged documents, and ingests them into the Unique knowledge base.

**Core Capabilities:**

- Fetches content from Microsoft Graph API and SharePoint REST API  
- Processes and forwards content to Unique AI's APIs  
- Handles authentication through Azure AD (Microsoft Entra ID)  
- Manages permission synchronization between SharePoint and Unique  
- Operates on a configurable schedule (default: every 15 minutes)

## Documentation

| Document | Description |
| --- | --- |
| [Architecture](https://docs.unique.ai/it-operators/integrations-connectors/sharepoint-connector/sharepoint-connector-technical-manual/sharepoint-connector-architecture) | System components, hosting models, connectivity |
| [Flows](https://docs.unique.ai/it-operators/integrations-connectors/sharepoint-connector/sharepoint-connector-technical-manual/sharepoint-connector-flows) | Content sync, permission sync, file diff mechanism |
| [Metadata](https://docs.unique.ai/it-operators/integrations-connectors/sharepoint-connector/sharepoint-connector-technical-manual/sharepoint-connector-metadata) | Ingested metadata fields for documents and SitePages |
| [Permissions](https://docs.unique.ai/it-operators/integrations-connectors/sharepoint-connector/sharepoint-connector-technical-manual/sharepoint-connector-permissions) | Microsoft Graph and SharePoint REST API permissions |
| [Security](https://docs.unique.ai/it-operators/integrations-connectors/sharepoint-connector/sharepoint-connector-technical-manual/sharepoint-connector-security) | Security updates, reports, and SBOM |

## Key Concepts

### Pull-Based Architecture

Unlike the previous Power Automate-based connector (v1) which used push-based principles, the SharePoint Connector v2 **pulls** information from SharePoint:

**Benefits:**

- No dependencies on Power Automate licensing  
- Full control over sync timing and behavior  
- Better visibility into sync operations  
- Containerized deployment model

### Selective Sync via Column Flag

Documents are not automatically synced. Users must explicitly flag documents by setting a custom column value:

### File Diff Mechanism

The connector maintains state to detect changes:

- **New files**: Flagged files not previously synced  
- **Modified files**: Files with changed content hash or metadata  
- **Deleted files**: Previously synced files no longer flagged or deleted from SharePoint

See [File Diff Flow](https://docs.unique.ai/it-operators/integrations-connectors/sharepoint-connector/sharepoint-connector-technical-manual/sharepoint-connector-flows) for details.

## Standard References

- [Microsoft Graph API](https://learn.microsoft.com/en-us/graph/overview) - Graph API overview
- [SharePoint REST API](https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/get-to-know-the-sharepoint-rest-service) - SharePoint REST service
- [Microsoft Entra ID](https://learn.microsoft.com/en-us/entra/identity/) - Authentication and authorization
