# SharePoint and OneDrive

> SharePoint and OneDrive: what the collector reads, how to connect it, its permissions, its certification by Atlantic Agentic Labs and its security posture.

Built, not certified Built and tested against recorded and synthetic responses (version 1.0.0, 10 November 2026). Not yet run against the vendor's sandbox or a client environment.

Reads the document libraries of the SharePoint sites you name, and the OneDrives of the people you name, so agents can answer from the team’s documents. It follows each drive’s delta, so an unchanged file is never fetched again, and what the owner deletes is withdrawn from the knowledge base.

## At a glance

| Collector                   | SharePoint and OneDrive, version `1.0.0`                                                                                                            |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Reads                       | Microsoft: SharePoint and OneDrive (Microsoft Graph) ([the vendor's documentation](https://learn.microsoft.com/en-us/graph/api/resources/onedrive)) |
| Family                      | Storage                                                                                                                                             |
| Kind                        | Files                                                                                                                                               |
| Ways to connect             | OAuth approval, Key pair                                                                                                                            |
| Scopes                      | - Read: `Sites.Read.All`, `Files.Read.All`                                                                                                          |
| Read only                   | Yes, except: \[object Object]; \[object Object]                                                                                                     |
| Vendor's API can move money | No                                                                                                                                                  |
| Personal data               | Content, Identity                                                                                                                                   |
| Hosts it may contact        | `graph.microsoft.com`, `login.microsoftonline.com`, `*.sharepoint.com`, `*.atlanticagenticlabs.com`                                                 |
| Vendor API versions         | Microsoft Graph v1.0 (drives, delta)                                                                                                                |
| Lowest engine version       | `0.45.0`                                                                                                                                            |

## What it reads

- Files in the sites (`<host>:/sites/<path>`, or a Graph site id) and libraries (by name; every library of the site otherwise), the drives (by id) and the OneDrives (by user principal name) you name. A whole tenant is never the default.
- Text, Markdown, CSV, PDF, Word (`.docx`), PowerPoint (`.pptx`) and Excel (`.xlsx`). Each keeps its site, library and path. PDFs go through `pdftotext` (the engine’s folder reader), the Office formats through the engine’s Office reader.
- The cursor is each drive’s delta link, kept with the ids written. A file added, changed, moved or deleted is reported by Graph; a deletion is withdrawn. A delta link Graph no longer honours (410, `resyncRequired`) re-reads the drive whole and withdraws what is no longer there.
- A drive that leaves the scope (a site or library taken out of the configuration) has its files withdrawn; a site that cannot be seen at the moment (403, 404) keeps them.
- Skipped and counted, never fatal: any other format, a file over `max_mb` (50 by default) and a document that will not open. A library always holds an image.

## How to connect

1. Choose how to sign in. **Approve in Microsoft**: a Microsoft Entra administrator consents for the organisation to Atlantic’s Microsoft app, and the deployment asks LightHouse for an hour’s token each time it reads (nothing secret is stored). **Your own app, by certificate**: register an app in your tenant, add the Graph application permissions below, grant admin consent, upload a certificate (RSA, 2048 bits or more) and keep the private key and certificate together in one PEM file.
2. In LightHouse, open **Connectors**, choose **SharePoint and OneDrive**, name the sites, libraries, drives and users, a label and how often to read, and approve or paste the tenant ID, client ID and PEM. Where your deployment keeps credentials in your own store, the PEM is sealed in your browser and LightHouse never sees it.
3. In code, set `SHAREPOINT_CREDENTIAL` (or the variable `credential_env` names) to the credential’s fields as JSON (`tenant_id`, `client_id`, `certificate`; or `{"tenant_id": ..., "app": "atlantic"}` for Atlantic’s app) and add a `kind: sharepoint` source card, or name the connection with `credential_secret`.

Both ways produce a one-hour app-only token, and a client secret is never accepted: a certificate cannot be copied from a log or a screenshot the way a password can.

## Permissions

Microsoft Graph application permissions, read only: `Sites.Read.All` for site libraries and `Files.Read.All` for OneDrive. The collector sends `GET` requests to `graph.microsoft.com` and to the pre-authenticated download links Graph returns (on `*.sharepoint.com` only, with no Authorization header; any other host is refused and never named in the error). The only other requests are the sign-in POSTs the manifest lists under `read_operations`: the certificate sign-in to `login.microsoftonline.com`, or, with Atlantic’s app, a signed request to LightHouse for a one-hour token. Its read-only test proves it on every change.

## Limits

- You must name sites, drives or users; the site form is `<name>.sharepoint.com:/sites/<path>` (or `/teams/<path>`), a user is a principal name.
- Files over `max_mb` (50 by default) and unsupported formats are skipped and counted.
- The token lasts an hour and is refreshed five minutes early.
- PDFs need `pdftotext` in the image; a PDF that will not convert is counted by class, not fatal.
- Graph’s delta can expire; the whole drive is then read again, which costs nothing for unchanged files.

## Data handling

- Document text is copied into the deployment’s corpus under the source’s `label`. Documents can name people and hold personal data of any kind.
- The certificate stays in your secret store (or is never held, with Atlantic’s app); only a one-hour token exists, and it is never written to logs, run notes or the raw cache. A download link’s temporary authorisation is never cached or named in an error.
- Nothing leaves the deployment: only counts reach LightHouse.

## Troubleshooting

| What you see                                                                   | What it means                                                     | What to do                                   |
| ------------------------------------------------------------------------------ | ----------------------------------------------------------------- | -------------------------------------------- |
| `name the sites, drives or users to sync; a whole tenant is never the default` | No scope was named                                                | Name sites, drives or users                  |
| `not SharePoint sites`                                                         | A site is not `<host>.sharepoint.com:/sites/<path>` or a Graph id | Correct the site                             |
| `not user principal names`                                                     | A OneDrive user is not an address                                 | Use the account’s principal name             |
| `credential variable 'SHAREPOINT_CREDENTIAL' is not set`                       | The credential variable is empty                                  | Set it to the credential’s JSON fields       |
| `has no tenant_id`                                                             | The credential JSON lacks the directory’s id                      | Add `tenant_id`, a GUID                      |
| `Microsoft refused the app's credential`                                       | The app, certificate or consent is wrong or revoked               | Check the app registration and admin consent |
| `a download link that is not SharePoint's was refused`                         | A download link pointed at another host                           | Report it; nothing was fetched               |
| Read succeeded, 0 written                                                      | No file changed since the delta link                              | Nothing to do                                |

## Certification

Each entry is a run by Atlantic Agentic Labs, newest first. Only a run against the vendor’s sandbox or a client environment certifies a collector; a certification lasts six months, or less if the vendor publishes an API version the collector does not list. See [How collectors are certified](/collectors/certification/).

| Date             | Collector | Engine   | Vendor API           | Method                              | Expires        |
| ---------------- | --------- | -------- | -------------------- | ----------------------------------- | -------------- |
| 10 November 2026 | `1.0.0`   | `0.45.0` | Microsoft Graph v1.0 | Fixtures only: built, not certified | Not applicable |

## Security posture

From the collector’s last scan on the default branch. What each line means, and what blocks a release: [Security posture](/collectors/security/).

| Last scanned               | 10 November 2026                                                                                                                                                                                                      |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Critical findings          | 0                                                                                                                                                                                                                     |
| High findings              | 0                                                                                                                                                                                                                     |
| Medium findings            | 0                                                                                                                                                                                                                     |
| Low findings               | 0                                                                                                                                                                                                                     |
| Info findings              | 0                                                                                                                                                                                                                     |
| Release blocked            | No                                                                                                                                                                                                                    |
| Network allow-list check   | Pass                                                                                                                                                                                                                  |
| Read-only behavioural test | Pass                                                                                                                                                                                                                  |
| SBOM (CycloneDX)           | Produced                                                                                                                                                                                                              |
| Dependency licences        | Pass                                                                                                                                                                                                                  |
| Scanners                   | bandit 1.9.4, semgrep 1.181.1, pip-audit 2.10.1, osv-scanner 2.7.0, cyclonedx-py 7.5.0, pip-licenses 5.5.5, gitleaks repository job aal-secrets, hosts_check tools/hosts_check.py, read-only test pytest -m read_only |

Source: https://docs.atlanticagenticlabs.com/collectors/catalogue/sharepoint/
