Skip to content

SharePoint integration

The SharePoint integration connects Speedwave to Microsoft 365 SharePoint sites via Microsoft Graph, enabling document management, web page authoring, and list data synchronization scoped strictly to a single site collection.

The SharePoint worker executes in an isolated container. Long-lived OAuth credentials (client_id, tenant_id, refresh_token) reside exclusively on the host at ~/.speedwave/oauth/<project>/sharepoint.json. The host daemon dynamically exchanges refresh tokens with Microsoft identity endpoints, mounting only short-lived access_token and site_id into the worker at /tokens/:

  • Directory~/.speedwave/oauth/<project>/
    • sharepoint.json (Host-only credentials)
  • Directory/tokens/ (Mounted read-only into container)
    • access_token
    • site_id
flowchart LR
  A[SharePoint Worker] -->|Proactive / 401 Refresh| B[Host OAuth Mediator]
  B -->|Refresh Token| C[Microsoft /oauth2/v2.0/token]
  C -->|Access Token| D["/tokens/access_token"]
  D -->|Reads Token| A

The worker exposes 28 operations targeting document libraries, modern site pages, and lists:

Tool nameCapability description
listFileIdsEnumerate files and folders within site document libraries.
getFileFullRetrieve file metadata and download properties.
downloadFileDownload SharePoint documents to local /workspace paths.
uploadFileUpload local workspace files with ETag concurrency controls.
listPagesEnumerate modern site pages.
getPageRetrieve page layout structure and web part definitions.
createPageAuthor modern SharePoint site pages.
updatePageUpdate full page layout specifications.
addWebPartInsert standard web parts into modern pages.
updateWebPartModify data properties of existing web parts.
removeWebPartDelete web parts from pages.
publishPagePublish draft pages to active viewer states.
addImageWebPartInsert image components from site assets.
generateTableOfContentsCompile navigation tables of contents from page heading hierarchies.
listListsEnumerate SharePoint lists within the site collection.
getListRetrieve list schema and field definitions.
createListAuthor custom SharePoint lists (requires Sites.Manage.All).
updateListModify list title, description, or configuration settings.
deleteListPermanently remove a list collection.
addListColumnCreate typed columns on existing lists (requires Sites.Manage.All).
removeListColumnDelete columns from lists.
listItemsRetrieve list rows with OData $filter queries.
getItemRetrieve individual list row records.
createItemCreate new list records.
updateItemUpdate existing list records.
deleteItemPermanently remove list items.
deletePageDelete modern site pages.
getCurrentUserRetrieve authenticated user profile metadata.

Local workspace operations strictly enforce path traversal validation and ignore paths matching sensitive configuration files (.git, .env, .speedwave, .ssh).

SharePoint integration requires an Azure AD App Registration configured with OAuth Device Flow:

site_id
acme.sharepoint.com:/sites/Marketing:
  1. Open your project in the Desktop application and select Integrations → SharePoint.
  2. Input client_id, tenant_id, and site_id.
  3. Initiate authentication and complete the device login prompt at https://microsoft.com/devicelogin.
  4. Grant requested permissions in Azure AD (Sites.Manage.All, Files.ReadWrite.All, User.Read, offline_access).
  5. Save settings to activate the worker.

The SharePoint worker can communicate exclusively with Microsoft Graph endpoints, restricted strictly to the configured site collection. Long-lived refresh tokens remain protected on the host. Refer to Credentials management for additional security specifications.