/onedrive:OneDrive-File-Managementfrom onedrive
Manages OneDrive personal and business files via Microsoft Graph API — upload, download, share, search, permissions, sync status, and delta queries for change tracking.
Ships in onedrive. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Microsoft OneDrive provides personal and business cloud file storage integrated with Microsoft 365. The Microsoft Graph API exposes full programmatic control over OneDrive content.
OneDrive Personal is tied to a Microsoft Account (consumer). OneDrive for Business is tied to a Microsoft 365 work or school account and backed by SharePoint document libraries. While both use the same Graph API surface, business accounts have additional admin controls, retention policies, and compliance features.
Base URL: https://graph.microsoft.com/v1.0
| Endpoint | Description |
|---|---|
/me/drive | Current user's default OneDrive |
/me/drives | All drives accessible to the current user |
/users/{userId}/drive | Another user's OneDrive (admin) |
/groups/{groupId}/drive | Group's document library |
/sites/{siteId}/drive | SharePoint site's default document library |
/drives/{driveId} | Specific drive by ID |
| Operation | Method | Endpoint |
|---|---|---|
| List children | GET | /me/drive/root/children or /me/drive/items/{itemId}/children |
| Get item | GET | /me/drive/items/{itemId} |
| Get by path | GET | /me/drive/root:/{path} |
| Create folder | POST | /me/drive/items/{parentId}/children with folder: {} |
| Delete item | DELETE | /me/drive/items/{itemId} |
| Move/rename | PATCH | /me/drive/items/{itemId} with parentReference and/or name |
| Copy item | POST | /me/drive/items/{itemId}/copy |
| Search | GET | /me/drive/root/search(q='{query}') |
Simple upload (< 4 MB):
PUT /me/drive/items/{parentId}:/{filename}:/content
Content-Type: application/octet-stream
<file bytes>
Resumable upload (> 4 MB, up to 250 GB):
POST /me/drive/items/{parentId}:/{filename}:/createUploadSessionPUT to the returned uploadUrl, using Content-Range headers.driveItem.Upload to path:
PUT /me/drive/root:/path/to/file.txt:/content
| Operation | Method | Endpoint |
|---|---|---|
| Create sharing link | POST | /me/drive/items/{itemId}/createLink |
| List permissions | GET | /me/drive/items/{itemId}/permissions |
| Grant access | POST | /me/drive/items/{itemId}/invite |
| Remove permission | DELETE | /me/drive/items/{itemId}/permissions/{permId} |
Sharing link types: view (read-only), edit (read-write), embed (embeddable).
Scope: anonymous (anyone with link), organization (org members only), users (specific people).
Track changes to a drive or folder over time:
GET /me/drive/root/delta
Returns a list of changed items and a @odata.deltaLink. Store the deltaLink and use it on subsequent calls to get only changes since the last query. This is the foundation for building sync clients.
GET /me/drive/root/search(q='quarterly report')
Searches file names, metadata, and file content (for indexed types like Office documents and PDFs). Results include @search.score for relevance ranking. Supports KQL (Keyword Query Language) in OneDrive for Business.
OneDrive operations require these Microsoft Graph delegated permissions:
| Scope | Description |
|---|---|
Files.Read | Read user's files |
Files.ReadWrite | Read and write user's files |
Files.Read.All | Read all files the user can access |
Files.ReadWrite.All | Read and write all files the user can access |
Sites.Read.All | Read SharePoint sites (for OneDrive for Business) |
offline_access | Maintain access (refresh tokens) |
For application-level access (daemon/service), use Files.ReadWrite.All as an application permission with admin consent.
List operations return pages of results. Check for @odata.nextLink in the response and follow it to get subsequent pages. Default page size is 200 items.
Upload and move operations support @microsoft.graph.conflictBehavior:
rename — Auto-rename the new item (e.g., file (1).txt)replace — Overwrite the existing itemfail — Return a 409 Conflict errorGet thumbnails for image and document files:
GET /me/drive/items/{itemId}/thumbnails
Returns small, medium, and large thumbnail URLs.
Access well-known folders:
GET /me/drive/special/{name}
Names: documents, photos, cameraroll, approot, music.
deltaLink between sync cycles.$select to request only needed properties and reduce payload size.$expand=children sparingly — prefer explicit children listing for large folders.POST /$batch) to send up to 20 requests in a single HTTP call.| Reference | Path | Content |
|---|---|---|
| Graph Drive API | references/graph-drive-api.md | Complete endpoint reference with request/response examples |
| Sharing Patterns | references/sharing-patterns.md | Link creation, permission management, external sharing |
| Delta Sync | references/delta-sync.md | Change tracking patterns and sync client architecture |
| Large File Upload | references/large-file-upload.md | Resumable upload session handling and chunking |
| Example | Path | Content |
|---|---|---|
| File Operations | examples/file-operations.md | Upload, download, move, copy, delete examples |
| Sharing Workflows | examples/sharing-workflows.md | Create links, invite users, manage permissions |
| Sync Client | examples/sync-client.md | Delta query-based change tracking implementation |
| Batch Operations | examples/batch-operations.md | Graph batch API for bulk file operations |
| Topic | File |
|---|---|
| DriveItem CRUD, upload/download, copy/move, folder management, search, versioning, thumbnails | references/file-operations.md |
| Sharing links (view/edit/embed), direct permissions, password-protected links, expiry, inherited vs direct | references/sharing-permissions.md |
| Delta function, incremental sync, delta tokens, deleted item handling, token persistence, conflict resolution | references/delta-sync.md |
| Upload session creation, chunked upload, resume interrupted uploads, progress tracking, 250 GB limit | references/large-file-upload.md |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub thelobbi/claude-m --plugin onedriveOther plugins' skills for the same job