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).
Why use this skill?
Access and manage your personal OneDrive files securely via Microsoft Graph API. Supports file listing, uploads, downloads, and more. Safe-by-default.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/cesarus85/ms-onedrive-personalWhat This Skill Does
The ms-onedrive-personal-graph skill provides a secure and straightforward way to interact with your personal OneDrive storage directly from your OpenClaw environment. It leverages the Microsoft Graph API to enable essential file management operations without requiring any browser automation on the server-side. This is achieved through a robust OAuth 2.0 device-code flow, making the authentication process simple and secure. The skill is designed with safety as a top priority, featuring a 'safe-by-default' approach that explicitly excludes destructive operations like file deletion. This ensures that your data remains protected.
Key functionalities include listing the contents of directories (ls), creating new folders (mkdir), uploading files (optimized for small to medium-sized files using a simple upload method), downloading files, and retrieving metadata about individual files or folders (info). All operations are managed using locally stored tokens, which can be refreshed if they expire, ensuring continuous access to your OneDrive files.
Installation
To install this skill, you will first need to register an application in Microsoft Entra ID to obtain a Client ID. Follow these steps:
- Navigate to the Entra portal:
https://entra.microsoft.com/. - Go to App registrations and click New registration.
- For supported account types, select Accounts in any organizational directory and personal Microsoft accounts.
- Click Create.
- In your newly created app's overview, go to Authentication and enable Allow public client flows. If prompted by your tenant, you may also need to set
isFallbackPublicClient=true.
Once you have your Client ID, run the setup script on the machine hosting OpenClaw:
cd /root/clawd/skills/ms-onedrive-personal-graph
./scripts/onedrive-setup.sh
This script will prompt you for your Client ID, guide you through the device code authentication process, and store the necessary tokens locally at ~/.onedrive-mcp/credentials.json. It will also perform a test to confirm access to your OneDrive.
Use Cases
This skill is ideal for integrating personal cloud storage into automated workflows. You can:
- Backup small files automatically: Upload logs, configuration files, or daily reports to OneDrive.
- Organize cloud storage: Create new directories for specific projects or date ranges.
- Retrieve documents for processing: Download invoices, reports, or other documents for analysis or further action.
- Maintain file metadata: Check file sizes, creation dates, and other properties.
- Sync personal files: Integrate with other OpenClaw skills to manage personal documents.
Example Prompts
- "List all files and folders in my OneDrive root directory."
- "Create a new folder named 'Project Reports' in my OneDrive."
- "Download the file '/Documents/Important/report_final.pdf' from OneDrive to my local Downloads folder."
Tips & Limitations
- Token Refresh: If you encounter authentication errors (e.g., 401 responses), refresh your tokens using the command
./scripts/onedrive-token.sh refresh. - Upload Size: The current implementation uses a simple upload method, which is best suited for small to medium-sized files. For very large files, consider implementing or waiting for an update that supports upload sessions.
- No Deletion: For safety, the skill does not support file or folder deletion. This prevents accidental data loss.
- Tenant Issues: If you face errors like
AADSTS5000225: tenant has been blocked due to inactivity, try authenticating with your Microsoft account directly or register the Entra app in a different tenant you control. - Public Client Flows: Ensure the 'Allow public client flows' option is enabled in your Entra app registration to avoid
AADSTS70002: client must be marked as 'mobile'errors.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-cesarus85-ms-onedrive-personal": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, file-write, file-read, external-api, code-execution