Setup
The mount needs a Microsoft Graph access token. A delegated token reads the signed-in user’s own drive with no drive ID; an app-only token, or any other drive, needs one drive selector.Quick token (Graph Explorer)
Quick token (Graph Explorer)
The fastest way to try it. The token lasts about an hour.
- Open Graph Explorer and sign in.
- Run a query such as
GET /me/driveand consent when asked. - Open the Access token tab and copy the token.
/me/drive and needs no drive ID.Device-code token (own app registration)
Device-code token (own app registration)
A delegated token from an app registration. The first sign-in is
interactive, so this is a development bootstrap, not an unattended
credential.
- In the Microsoft Entra admin center, go to Entra ID > App registrations > New registration. For a personal account, choose Any Entra ID Tenant + Personal Microsoft accounts.
- Under Authentication, set Allow public client flows to Yes.
-
Under API permissions > Microsoft Graph > Delegated
permissions, add
Files.Readfor the user’s own drive, orFiles.ReadWritefor writes. Other drives or SharePoint may needFiles.Read.All,Files.ReadWrite.Allor aSites.*permission. -
Request a device code with the Application (client) ID, open
https://microsoft.com/deviceloginand enter theuser_codeit prints. For writes, ask forFiles.ReadWrite: -
After signing in, exchange the
device_codefor tokens:
access_token that returns a fresh token.Find a drive ID
Find a drive ID
App-only tokens cannot use The first two give the user’s drive and every drive the user can see; the
last two give a SharePoint site’s ID and its libraries. A drive ID looks
like
/me/drive, so they set one of drive_id,
site_id, group_id or user_id. With the token in TOKEN:b!a1B2c3....Connect
- YAML
- Python
- TypeScript
workspace.yaml
Layout
- Set at most one of
drive_id,site_id,group_idanduser_id; with none the mount is the signed-in user’s drive.key_prefixmounts a folder. - Office files stay raw bytes, with no conversion.
- 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 drive; the
token needs Files.ReadWrite or a wider write permission.
SDK guides
Python
Every config field, the VFS.md and write support.
TypeScript
Every config field, the VFS.md and write support.