Setup
The mount needs only a Microsoft Graph access token with SharePoint access.App-only token (client credentials)
App-only token (client credentials)
Best for scripts and CI. There is no signed-in user; the mount works
through
/sites and /sites/{id}/drives, which need no /me context.- In the Microsoft Entra admin center, go to Entra ID > App registrations > New registration.
-
Under API permissions > Microsoft Graph > Application
permissions, add
Sites.Read.Allto read orSites.ReadWrite.Allto write, then click Grant admin consent. - Under Certificates & secrets, create a client secret.
-
Request a token:
Delegated token (Graph Explorer)
Delegated token (Graph Explorer)
The fastest way to try it as a user. The token lasts about an hour and
reaches only what that user can.
- Open Graph Explorer and sign in.
- Run a SharePoint query such as
GET /sites?search=*and consent when asked. - Open the Access token tab and copy the token.
Check access
Check access
With the token in
TOKEN, list the sites and one site’s libraries:access_token: it is called for each request and again after a
401, so the mount outlives one token.
Connect
- YAML
- Python
- TypeScript
workspace.yaml
Layout
- Paths read
/<site>/<library>/<path>, with the site’s display name.tenant_hostandsite_filternarrow the sites listed. siteplusdrivemounts one library as the root, andkey_prefixone folder inside it.- Snapshots pin files through version history, which is on by default; old versions read only while the library keeps them (an admin can cap or turn off versioning).
Sample runs
write mount, tee, cp, mv, rm and mkdir change the library;
the token needs a write permission such as Sites.ReadWrite.All.
SDK guides
Python
Every config field, the VFS.md and write support.
TypeScript
Every config field, the VFS.md and write support.