Skip to main content
skill CX Codex

add-onedrive — Claude Code skill: connects OneDrive

add-onedrive adds OneDrive for Business connector to a Power Apps code app and configures file operations.

MIT ★ 1,167 updated 2026-10-29

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add microsoft/power-platform-skills
/plugin install code-apps-preview@power-platform-skills
Open on GitHub

What add-onedrive does

The skill checks for an existing OneDrive connection in the environment, adds the connector via pa app add data-source, and generates a TypeScript service with methods like ListFolder, CreateFile, GetFileContent. Requires Power Platform CLI (pa) and an active environment with ID in power.config.json. If no connection exists, it provides a link to create one at https://make.powerapps.com/environments/<environment-id>/connections.

After configuration, runs npm run build and checks for TypeScript errors. Updates memory-bank.md with the added connector and configured operations. The generated OneDriveForBusinessService.ts file can be large; the skill uses Grep to find specific methods.

What it helps with

  • add OneDrive for Business connector to a Power Apps code app
  • configure file upload and download from OneDrive
  • list files in a OneDrive folder via TypeScript
  • create a file in OneDrive from application code
  • generate a TypeScript service for OneDrive API operations

Example prompts for the agent

  • Add the OneDrive for Business connector to the app
  • Set up file upload to OneDrive in the /Documents folder
  • Generate code to list files from the OneDrive root folder

How to install add-onedrive

1Plugin marketplace

/plugin marketplace add microsoft/power-platform-skills
/plugin install code-apps-preview@power-platform-skills

This installs the whole code-apps-preview plugin with all its skills

2Skills CLI (Vercel)

npx skills add microsoft/power-platform-skills --skill add-onedrive -a claude-code

3Manually: put the files in place

~/.claude/skills/add-onedrive/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/add-onedrive/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about add-onedrive

How to install add-onedrive in Claude Code?

Run /plugin marketplace add microsoft/power-platform-skills, then /plugin install code-apps-preview@power-platform-skills, then npx skills add microsoft/power-platform-skills --skill add-onedrive -a claude-code. The skill file will be at ~/.claude/skills/add-onedrive/SKILL.md.

What does add-onedrive do?

It adds the OneDrive for Business connector to a Power Apps code app, generates a TypeScript service with file operation methods, and configures upload, download, and folder creation as requested by the user.

What does add-onedrive require to work?

Power Platform CLI (pa), an active environment with ID in power.config.json, and an existing OneDrive for Business connection in that environment. If no connection exists, the skill directs you to create one via the Power Apps web interface.

Source text

SKILL.md · MIT
---
name: add-onedrive
description: Adds OneDrive for Business connector to a Power Apps code app. Use when uploading, downloading, listing, or managing files in OneDrive.
user-invocable: true
allowed-tools: Read, Edit, Write, Grep, Glob, Bash, LSP, TaskCreate, TaskUpdate, TaskList, TaskGet, AskUserQuestion, Skill
model: sonnet
---

**📋 Shared Instructions: [shared-instructions.md](${PLUGIN_ROOT}/shared/shared-instructions.md)** - Cross-cutting concerns.

# Add OneDrive for Business

## Workflow

1. Check Memory Bank → 2. Add Connector → 3. Configure → 4. Build → 5. Update Memory Bank

---

### Step 1: Check Memory Bank

Check for `memory-bank.md` per [shared-instructions.md](${PLUGIN_ROOT}/shared/shared-instructions.md).

### Step 2: Add Connector

**First, find the connection ID** (see [connector-reference.md](${PLUGIN_ROOT}/shared/connector-reference.md)):

Run the `/list-connections` skill. Find the OneDrive for Business connection in the output. If none exists, direct the user to create one using the environment-specific Connections URL — construct it from the active environment ID in context (from `power.config.json` or a prior step): `https://make.powerapps.com/environments/<environment-id>/connections` → **+ New connection** → search for the connector → Create.

```bash
pa app add data-source --connector onedriveforbusiness -c <connection-id>
```

### Step 3: Configure

Ask the user what file operations they need (list files, upload, download, create folder, etc.).

**Common operations:**

```typescript
// List files in a folder
const files = await OneDriveForBusinessService.ListFolder({
  id: "root" // or folder ID
});

// Get file metadata
const metadata = await OneDriveForBusinessService.GetFileMetadata({
  id: "file-id"
});

// Get file content
const content = await OneDriveForBusinessService.GetFileContent({
  id: "file-id"
});

// Create file
await OneDriveForBusinessService.CreateFile({
  folderPath: "/Documents",
  name: "report.txt",
  body: "File content here"
});
```

**Key points:**

- File and folder IDs can be obtained from `ListFolder` or `ListRootFolder`
- Use `folderPath` for creating files by path, `id` for accessing existing files
- Binary file content may need base64 encoding/decoding depending on the operation

Use `Grep` to find specific methods in `src/generated/services/OneDriveForBusinessService.ts` (generated files can be very large -- see [connector-reference.md](${PLUGIN_ROOT}/shared/connector-reference.md#inspecting-large-generated-files)).

### Step 4: Build

```bash
npm run build
```

Fix TypeScript errors before proceeding. Do NOT deploy yet.

### Step 5: Update Memory Bank

Update `memory-bank.md` with: connector added, configured operations, build status.

© Microsoft · MIT · microsoft/power-platform-skills

Similar skills

All skills for Cloud: AWS, Azure, GCP →

From the same set157

The whole set →
add-teams The add-teams skill connects Microsoft Teams to a Power Apps code app and helps configure chat messages or channel posts. CX Codex +1 ★ 1,167repo stars analytics analytics is a Claude Code skill that routes Process Mining queries, shows process and event/variant metrics, and loads a specialist skill for deeper analysis. CX Codex +1 ★ 1,167repo stars canvas-create-screens canvas-create-screens organizes approved functional requirements into task-focused screens, states, and navigation paths for Canvas apps before UI control selection. CX Codex ★ 1,167repo stars telemetry telemetry is a Claude Code skill that toggles power-automate telemetry or reports its setting. It responds to requests to change the setting or inspect it. CX Codex +1 ★ 1,167repo stars browse-flows browse-flows explores Power Automate environments and flows inside Claude Code. Useful when you need to inspect existing cloud flows, view triggers, or pick a flow for debugging. CX Codex +1 ★ 1,167repo stars canvas-create-functionality The canvas-create-functionality subagent records app users, tasks, requirements, and observable outcomes before Canvas screens are designed. Use it to shape the requested functionality first. CX Codex ★ 1,167repo stars route-environments route-environments is a Claude Code skill that checks Power Platform environment routing and shows where new makers land when they open the platform. CX Codex +1 ★ 1,167repo stars add-excel add-excel attaches the Excel Online (Business) connector to Power Apps code apps to read and write workbook tables in OneDrive or SharePoint. CX Codex +1 ★ 1,167repo stars

Project sponsors

Companies that keep this analytics open