SharePoint Importer

Walk a SharePoint/OneDrive document library with the Microsoft Graph API and stream every file into RememberOS. Ships in the repo: connectors/sharepoint/import_sharepoint.py (stdlib + httpx only).

One-time Azure setup#

  1. Entra ID → App registrations → New registration.
  2. API permissions → Microsoft Graph → Application permissions: Sites.Read.All + Files.Read.All → grant admin consent. (Scope to specific sites with Sites.Selected if you prefer.)
  3. Certificates & secrets → new client secret.

Run#

export GRAPH_TENANT_ID=…  GRAPH_CLIENT_ID=…  GRAPH_CLIENT_SECRET=…
export SHAREPOINT_SITE="https://contoso.sharepoint.com/sites/Marketing"
export LONGMEM_API_KEY=mv_…

python import_sharepoint.py --collection sharepoint --dry-run   # list only
python import_sharepoint.py --collection sharepoint             # import

Behaviour#