Codumentor logo Codumentor Enterprise

SharePoint Online (Enterprise read pilot)

SharePoint gives foreground web conversations three read-only tools:
sharepoint_browse, sharepoint_get, and sharepoint_download. Downloads can
stage .docx, .xlsx, and .pptx files for editing as separate local drafts.
The connector never changes a remote file and does not search the tenant.

Configure the pilot

  1. In Microsoft Entra, register a single-tenant Web application and provision a confidential client secret. Add only the Microsoft Graph delegated Sites.Selected resource permission (remove User.Read if added by default). Obtain administrator consent. In addition, have a tenant admin grant the app read on each approved pilot site out of band. Each user must also have SharePoint access in that tenant. Do not grant wider permissions if the pilot's endpoints reject the selected grant.
  2. Set api.external_url to the externally reachable Codumentor base URL (HTTPS outside loopback development). In Entra register that base URL plus /oauth/callback/sharepoint as the exact redirect URI. Set auth.jwt_secret for encrypted token storage. Inject SHAREPOINT_TENANT_ID, SHAREPOINT_CLIENT_ID, and SHAREPOINT_CLIENT_SECRET into the Codumentor server environment; users do not paste credentials into Settings.
  3. Enable the commented Enterprise SharePointPlugin example and OAuthPlugin entry in host configuration. Keep SharePoint at priority 3 and OAuth at 4; do not add an OAuth dependency edge. Use exact Graph site IDs (tenant.sharepoint.com,<site UUID>,<web UUID>) and drive IDs, with unique aliases and one entry per approved library. The site grant does not implement the narrower drive allowlist; Codumentor does. Downloads require an active overlay-isolated workspace with its read-only attachment mount; configure it without sync and enable the appropriate Office editor plugins and workspace_files. SharePoint is available on fresh web messages, not background wakes or resumed turns.
  4. Run ./.venv/bin/python -m codumentor --config <pilot.yaml> api --port <free-port>. An enrolled user with oauth:manage connects their own work account from Settings → Extensions → SharePoint. If multiple accounts are linked, disconnect the extras; the tools will not pick one automatically.

Browse and save a draft

In a new web chat, ask to browse the pilot site and library, download a file,
copy it to a fresh workspace path with the normal shell approval, open that
copy in the corresponding Office editor, and save to a different workspace
path. Download the saved draft from its Files card. The read-only staging path
is not an Office input path. Failed or incomplete transfers are not staged.
The download cap is 20 MiB or the lower configured attachment limit.

Direct URLs are off by default. To enable them, set allow_direct_urls: true
and set an exact HTTPS root_url per applicable library. Use the canonical
file URL beneath that root, without credentials, query, fragment, or sharing
redirects. For unsupported links, browse by alias and item ID instead. The
pilot accepts Graph-issued downloads on the approved site's exact SharePoint
host only. A different CDN or transfer host fails closed; no extra domains are
implicitly trusted.

Disconnect and/or remove the app's site grant to stop future use. Existing
staged bytes and local drafts must be removed according to retention policy.
If content is opened or edited, excerpts may reach the configured model and
transcript; use approved deployment/model and data. The fake Graph tests do
not establish live delegated endpoint compatibility. Before rollout, verify
allowed and denied users, excluded libraries and sites, revocation, each Office
handoff and the actual transfer host against a disposable tenant.