# Onedrive

> Manage OneDrive files and folders via Microsoft Graph. Upload, download, and share files.

- Skill: `majiayu000/onedrive` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds add majiayu000/onedrive`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/onedrive/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/onedrive

---

# OneDrive
Microsoft cloud storage.
## Environment
```bash
export MICROSOFT_ACCESS_TOKEN="xxxxxxxxxx"
```
## List Root Files
```bash
curl "https://graph.microsoft.com/v1.0/me/drive/root/children" -H "Authorization: Bearer $MICROSOFT_ACCESS_TOKEN"
```
## Upload File
```bash
curl -X PUT "https://graph.microsoft.com/v1.0/me/drive/root:/filename.txt:/content" \
  -H "Authorization: Bearer $MICROSOFT_ACCESS_TOKEN" \
  -H "Content-Type: text/plain" \
  --data-binary @localfile.txt
```
## Download File
```bash
curl "https://graph.microsoft.com/v1.0/me/drive/items/{itemId}/content" \
  -H "Authorization: Bearer $MICROSOFT_ACCESS_TOKEN" -o downloaded.txt
```
## Links
- Docs: https://docs.microsoft.com/en-us/graph/api/resources/onedrive

