> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mirage.strukto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# SharePoint

> Mount SharePoint sites and document libraries through Microsoft Graph from Node or the browser.

`SharePointVFS` shares its file-operation backend with OneDrive. Its additional resolver maps SharePoint sites and document libraries onto the virtual tree.

```ts theme={null}
import { MountMode, SharePointVFS, Workspace } from '@struktoai/mirage-node'

const sharepoint = new SharePointVFS({
  accessToken: () => getMicrosoftGraphToken(),
  tenantHost: 'contoso.sharepoint.com',
})

const ws = new Workspace({ '/sharepoint': sharepoint }, { mode: MountMode.WRITE })
await ws.shell('ls /sharepoint/')
await ws.shell('ls /sharepoint/Engineering/Documents/')
```

An unscoped mount uses `/site/library/path`. To hide the site and library levels, configure `site` and `drive` together; `keyPrefix` can narrow that drive further.

```ts theme={null}
new SharePointVFS({
  accessToken,
  site: 'Engineering',
  drive: 'Documents',
  keyPrefix: 'Reports/2026',
})
```

| Field | Default | Notes |
| - | - | - |
| `accessToken` | required | Token string or sync/async callback. Redacted in snapshots. |
| `tenantHost` | unset | Keep only sites whose `webUrl` belongs to this host. |
| `siteFilter` | `*` | Microsoft Graph site search expression. |
| `site`, `drive` | unset | Configure both to scope the mount to one library. |
| `keyPrefix` | unset | Folder subtree inside the scoped library. |
| `timeout` | `30` | Request and copy-monitor timeout in seconds. |
| `maxRetries` | `5` | Retries for Graph throttling and transient failures. |

Node and browser expose the same API. Filesystem behavior and snapshot version pinning mirror the [Python SharePoint VFS](/python/vfs/sharepoint).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.