ms-onedrive-personal-graph

Access OneDrive Personal (consumer Microsoft accounts) via Microsoft Graph using OAuth device-code flow. Supports ls/mkdir/upload/download/info; safe-by-default (no delete).

7 stars

Best use case

ms-onedrive-personal-graph is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Access OneDrive Personal (consumer Microsoft accounts) via Microsoft Graph using OAuth device-code flow. Supports ls/mkdir/upload/download/info; safe-by-default (no delete).

Teams using ms-onedrive-personal-graph should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/ms-onedrive-personal/SKILL.md --create-dirs "https://raw.githubusercontent.com/Demerzels-lab/elsamultiskillagent/main/public/skills/cesarus85/ms-onedrive-personal/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/ms-onedrive-personal/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How ms-onedrive-personal-graph Compares

Feature / Agentms-onedrive-personal-graphStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Access OneDrive Personal (consumer Microsoft accounts) via Microsoft Graph using OAuth device-code flow. Supports ls/mkdir/upload/download/info; safe-by-default (no delete).

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# OneDrive Personal (Consumer) via Microsoft Graph

A small, safe-by-default skill to access **OneDrive Personal** (consumer Microsoft accounts) using the **Microsoft Graph API**.

It uses **OAuth 2.0 device-code flow** (no browser automation needed on the server) and stores tokens locally.

## Features
- Authenticate via device code
- List folders (`ls`)
- Create folders (`mkdir`)
- Upload files (simple upload; best for small/medium files)
- Download files
- Show item metadata (`info`)

## Safety / non-features
- **No delete** operations (by design)
- No bulk move/rename (can be added later)

## Setup (first time)
### 1) Create a Microsoft Entra app registration
You need a **Client ID**.

Create an app registration (recommended):
1. Go to the Entra portal: https://entra.microsoft.com/
2. **App registrations** → **New registration**
3. Supported account types: **Accounts in any organizational directory and personal Microsoft accounts**
4. Create
5. In the app: **Authentication** → enable **Allow public client flows**
   - (Some tenants also require setting `isFallbackPublicClient=true` — the script will tell you if needed.)

> Note: Some users hit Azure portal sign-in errors like “tenant blocked due to inactivity”. That is *not* required for OneDrive itself, but it can block creating an app registration. In that case, create the app under a different Entra tenant you control, **as long as it’s configured to allow personal Microsoft accounts**.

### 2) Run setup
On the machine running OpenClaw:
```bash
cd /root/clawd/skills/ms-onedrive-personal-graph
./scripts/onedrive-setup.sh
```

The script will:
- Ask for the Client ID
- Print a device login URL + code
- Wait until you approve the login
- Save tokens to `~/.onedrive-mcp/credentials.json`
- Test access to `https://graph.microsoft.com/v1.0/me/drive`

## Usage
All commands use the token in `~/.onedrive-mcp/credentials.json`.

```bash
./scripts/onedrive-cli.sh ls /
./scripts/onedrive-cli.sh mkdir "/Invoices"
./scripts/onedrive-cli.sh upload ./invoice.pdf "/Invoices/invoice.pdf"
./scripts/onedrive-cli.sh download "/Invoices/invoice.pdf" ./invoice.pdf
./scripts/onedrive-cli.sh info "/Invoices/invoice.pdf"
```

## Token refresh
If you get 401/invalid token, refresh with:
```bash
./scripts/onedrive-token.sh refresh
```

## Troubleshooting
### AADSTS5000225: tenant has been blocked due to inactivity
This happens when your login is tied to an Entra tenant that Microsoft marked inactive.
- Use https://account.microsoft.com/ for the consumer account (usually works)
- Create the app registration in a different tenant you control (or via a different admin identity)

### AADSTS70002: client must be marked as 'mobile'
Enable **Allow public client flows** and/or set `isFallbackPublicClient=true` in the app.

### Upload limits
This skill uses the **simple upload** endpoint (`...:/content`). For large files, we should add upload-session support.

Related Skills

google-imagen-3-portrait-photography

7
from Demerzels-lab/elsamultiskillagent

Generate professional portrait photography using Google Imagen 3. Use when creating realistic portraits, headshots, or artistic character photography with professional lighting and composition.

personaldatahub

7
from Demerzels-lab/elsamultiskillagent

Pull personal data (emails, issues) and propose outbound actions (drafts, replies) through the PersonalDataHub.

personal-data-hub

7
from Demerzels-lab/elsamultiskillagent

Pull personal data (emails, issues) and propose outbound actions (drafts, replies) through the PersonalDataHub.

personal-assistant

7
from Demerzels-lab/elsamultiskillagent

Personal daily briefing and productivity assistant.

personal-travel

7
from Demerzels-lab/elsamultiskillagent

Acts as the user's travel planning assistant in the Travel topic.

personal-sleep

7
from Demerzels-lab/elsamultiskillagent

Acts as the user's sleep coach in the Sleep topic.

personal-plans

7
from Demerzels-lab/elsamultiskillagent

Acts as the user's personal planning assistant in the Plans topic.

personal-nutrition

7
from Demerzels-lab/elsamultiskillagent

Acts as the user's personal nutrition coach in the Nutrition topic.

personal-notes

7
from Demerzels-lab/elsamultiskillagent

Acts as the user's note-taking and journaling assistant in the Notes topic.

personal-love

7
from Demerzels-lab/elsamultiskillagent

Acts as the user's relationship and dating assistant in the Love topic.

personal-ideas

7
from Demerzels-lab/elsamultiskillagent

Acts as the user's idea capture and brainstorm partner in the Ideas topic.

personal-hygiene

7
from Demerzels-lab/elsamultiskillagent

Acts as the user's personal care and grooming assistant in the Hygiene topic.