Skip to main content
skill CX Codex

add-sharepoint · microsoft, code-apps — Claude Code skill: what it does, how to install

add-sharepoint connects SharePoint Online to Power Apps code apps: reads lists, manages documents, creates new lists via Graph API.

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-sharepoint does

The skill adds the SharePoint Online connector to a Power Apps project. Two paths: connect to existing lists or build new ones through Graph API. For new lists, the skill requires Azure CLI, checks what already exists on the site to avoid duplicates, and presents a column schema for approval.

Without Sites.Manage.All in Graph API, list creation fails. For existing lists, a connection ID from the Power Apps environment is enough — the skill calls pa connector list-datasets and pa connector list-tables, shows available sites and libraries, adds the data source with pa app add data-source.

The app code gains methods like SharePointOnlineService.GetItems, PostItem, ListFolder, GetFileContent. The dataset parameter takes the full site URL, table takes the list name. The instructions flag column encoding, choice fields, and lookup relationships between lists.

What it helps with

  • connect a SharePoint list to a Power Apps code app
  • create a new SharePoint list with specified columns from code
  • read documents from a SharePoint library and display them in the app

Example prompts for the agent

  • Connect the tasks list from the sales SharePoint site, columns Title, Status, DueDate
  • Create a customers list on the crm site with fields for name, phone, registration date
  • Show files from the Shared Documents library on the hr site

How to install add-sharepoint

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-sharepoint -a claude-code

3Manually: put the files in place

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

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

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

Questions about add-sharepoint

How to install add-sharepoint in Claude Code?

Run /plugin marketplace add microsoft/power-platform-skills, then /plugin install code-apps-preview@power-platform-skills. The skill appears in ~/.claude/skills/add-sharepoint/SKILL.md.

What does the add-sharepoint skill do?

It adds the SharePoint Online connector to a Power Apps code app. Reads lists, document libraries, creates new lists via Graph API, configures the connection to a selected site.

What permissions are needed to create lists?

Sites.Manage.All in Graph API. The skill uses Azure CLI for auth. If lists already exist, a connection ID from the Power Apps environment is sufficient.

Source text

SKILL.md · MIT
---
name: add-sharepoint
description: Adds SharePoint Online connector to a Power Apps code app. Use when reading lists, managing documents, or integrating with SharePoint sites. Can also create new SharePoint lists.
user-invocable: true
allowed-tools: Read, Edit, Write, Grep, Glob, Bash, LSP, TaskCreate, TaskUpdate, TaskList, TaskGet, AskUserQuestion, Skill, EnterPlanMode, ExitPlanMode
model: opus
---

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

**References:**

- [sharepoint-reference.md](./references/sharepoint-reference.md) - Column encoding, choice fields, lookups, API patterns (CRITICAL)
- [api-authentication-reference.md](./references/api-authentication-reference.md) - Graph API auth, token, site ID
- [list-management-reference.md](./references/list-management-reference.md) - Query, create, extend lists and columns

# Add SharePoint

Two paths: **existing lists** (skip to Step 6) or **new lists** (full workflow).

## Workflow

1. Check Memory Bank → 2. Plan → 3. Setup Graph API Auth → 4. Review Existing Lists → 5. Create Lists → 6. Get Connection ID → 7. Discover Sites → 8. Discover Tables → 9. Add Connector → 10. Configure → 11. Build → 12. 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: Plan

Ask the user:

1. Which SharePoint list(s) do they need?
2. Do the lists **already exist** on their site, or do they need to **create new** ones?

**If lists already exist:** Skip to Step 6.

**If creating new lists:**

- Ask about the data they need and design an appropriate schema
- Reuse existing lists when possible (don't duplicate)
- Enter plan mode with `EnterPlanMode`, present the list designs with columns and types
- Get approval with `ExitPlanMode`

### Step 3: Setup Graph API Auth (if creating lists)

See [api-authentication-reference.md](./references/api-authentication-reference.md) for full details.

```powershell
az account show   # Verify Azure CLI logged in

$api = Initialize-SharePointGraphApi -SiteUrl "https://<tenant>.sharepoint.com/sites/<site-name>"
$headers = $api.Headers
$siteId = $api.SiteId
```

Requires **Sites.Manage.All** permission.

### Step 4: Review Existing Lists (if creating lists)

**Always query existing lists first before creating:**

```powershell
$existingLists = Invoke-RestMethod -Uri "https://graph.microsoft.com/v1.0/sites/$siteId/lists?`$select=id,displayName,description,list&`$filter=list/hidden eq false" -Headers $headers
```

See [list-management-reference.md](./references/list-management-reference.md) for `Find-SimilarLists`, `Compare-ListSchemas`, and `Get-ListSchema` functions.

Present findings to user with `AskUserQuestion`:

- Lists that can be **reused** (already exist with matching columns)
- Lists that need **extension** (exist but missing columns)
- Lists that must be **created** (no match found)

### Step 5: Create Lists (if creating lists)

Get explicit confirmation before creating. Use safe functions from [list-management-reference.md](./references/list-management-reference.md):

- `New-SharePointListIfNotExists`
- `Add-SharePointColumnIfNotExists`
- `Add-SharePointLookupColumn` (for cross-list references)

### Step 6: Get Connection ID

Find the SharePoint Online connection ID (see [connector-reference.md](${PLUGIN_ROOT}/shared/connector-reference.md)):

Run the `/list-connections` skill. Find the SharePoint Online 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.

### Step 7: Discover Sites

List available SharePoint sites the user has access to:

```bash
pa connector list-datasets --connector sharepointonline -c <connection-id>
```

Present the sites to the user and ask which one(s) they want to connect to. If the user already specified a site URL, confirm it appears in the list.

**If `pa connector list-datasets` fails or returns no results:**
- Auth error: Run `pa auth logout` (or `power-apps logout` on `power-apps`-only projects), then retry — the CLI will re-prompt browser login.
- Empty list: Confirm the connection ID is for a SharePoint Online connection and the user has access to at least one site. STOP if the list is empty after confirming.
- Any other non-zero exit: Report the exact error output. STOP.

### Step 8: Discover Tables

For each selected site, list the available lists and document libraries:

```bash
pa connector list-tables --connector sharepointonline -c <connection-id> -d '<site-url>'
```

**If `pa connector list-tables` fails or returns no results:**
- Confirm the site URL from Step 7 is exact (copy from the output — do not retype).
- If still empty, the user may not have access to that site's lists. Ask them to verify permissions in SharePoint.
- Any other non-zero exit: Report the exact error output. STOP.

Present the tables to the user and ask which ones they want to add. Suggest tables that look relevant to their use case (based on memory bank context or the user's stated requirements). If lists were created in Step 5, they should appear here.

### Step 9: Add Connector

SharePoint is a tabular datasource -- requires `-c` (connection ID), `-d` (site URL), and `--table` (list name):

```bash
pa app add data-source --connector sharepointonline -c <connection-id> -d '<site-url>' --table '<table-name>'
```

Run the command for each list or library the user selected. The `-d` (dataset) is the SharePoint site URL from Step 7, `--table` is the list/library name from Step 8.

### Step 10: Configure

**Read [sharepoint-reference.md](./references/sharepoint-reference.md) before writing any SharePoint code** -- column encoding, choice fields, and lookups have critical gotchas.

**Common operations:**

```typescript
// Get items from a SharePoint list
const items = await SharePointOnlineService.GetItems({
  dataset: "https://contoso.sharepoint.com/sites/your-site",
  table: "Your List Name"
});

// Create a new list item
await SharePointOnlineService.PostItem({
  dataset: "https://contoso.sharepoint.com/sites/your-site",
  table: "Your List Name",
  item: {
    Title: "New Item",
    Description: "Item description",
    Status: "Active"
  }
});

// Get files from a document library
const files = await SharePointOnlineService.ListFolder({
  dataset: "https://contoso.sharepoint.com/sites/your-site",
  id: "Shared Documents" // Library name or folder ID
});

// Get file content
const content = await SharePointOnlineService.GetFileContent({
  dataset: "https://contoso.sharepoint.com/sites/your-site",
  id: "file-server-relative-url"
});
```

**Key points:**

- `dataset` is always the full SharePoint site URL
- `table` is the list display name for list operations
- List column names in the API may differ from display names (spaces become `_x0020_`, special chars encoded)
- Document library operations use folder/file IDs or server-relative URLs
- Choice columns use **string values**, not integer picklist codes (unlike Dataverse)

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

### Step 11: Build

```bash
npm run build
```

Fix TypeScript errors before proceeding. Do NOT deploy yet.

### Step 12: Update Memory Bank

Update `memory-bank.md` with: connector added, site URL, lists/libraries configured (or created), build status.

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

Similar skills

All skills for Cloud: AWS, Azure, GCP →

add-sharepoint by other authors comes first.

add-sharepoint Microsoft add-sharepoint is a Claude Code skill that connects SharePoint lists and libraries to a Power Apps mobile app, using existing lists or planning and creating new ones. CX Codex +1 ★ 1,167repo stars Microsoft 365 SharePoint mindstone Microsoft 365 SharePoint — an MCP server that gives your agent SharePoint through Microsoft Graph: find sites, read libraries and lists, search content, and create sharing links. CX Codex +1 ★ 14repo stars microsoft-sharepoint membrane Connects your agent to Microsoft SharePoint via Membrane CLI to manage sites and documents. Useful when an agent needs to read files or update list items. CX Codex +1 1,600installs hunt-sharepoint Sachin Sharma hunt-sharepoint — a Claude skill that works through an on-prem SharePoint Server farm: anonymous endpoints, build fingerprinting, the legacy SOAP login bypass and the preconditions for CVE-2025-53770. CX Codex +1 ★ 16,193repo stars m365-admin VoltAgent Community m365-admin automates Microsoft 365 administration tasks, including Exchange mailboxes, Teams, SharePoint sites, and license management via Graph API. Built for M365 engineers. CX Codex 229installs sharepoint official OpenAI Connects the agent to your SharePoint files through a configured Microsoft SharePoint app connector. CX Codex GP ChatGPT ★ 8,052repo stars cli-microsoft365-mcp-server pnp cli-microsoft365-mcp-server — an MCP server that turns plain-language requests into chains of CLI for Microsoft 365 commands. Useful when tenant admin work is easier to describe than to script. CX Codex +1 ★ 138repo stars

From the same set157

The whole set →
report-issue report-issue collects project details and diagnostics, then drafts a GitHub issue for the mobile-app plugin. Use it to document a bug, unexpected result, or documentation problem. CX Codex +1 ★ 1,167repo stars setup setup guides the agent through Process Intelligence configuration: dependency checks, cloud and environment selection, az login binding, then profile activation. CX Codex +1 ★ 1,167repo stars debug-flow debug-flow diagnoses failed Power Automate runs. It traces execution graphs, flags root causes, and prepares targeted flow fixes. CX Codex +1 ★ 1,167repo stars configure-canvas-mcp The configure-canvas-mcp skill connects Canvas Authoring MCP to an active Power Apps coauthoring session. Run it before editing a canvas app when the server is not connected yet. CX Codex +1 ★ 1,167repo stars preview-offline-scope preview-offline-scope estimates download payload and sync frequency costs for a Power Platform offline profile before rollout. Runs strictly in read-only mode. CX Codex +1 ★ 1,167repo stars canvas-screen-builder canvas-screen-builder is a Claude Code subagent that adds or edits one screen in an existing Canvas App from a shared contract and scoped brief. It runs local QA without compiling. CX Codex ★ 1,167repo stars code-app-architect code-app-architect is a Claude Code subagent that guides Power Apps code project architecture with React and Vite, Dataverse integration, connector selection, and build troubleshooting. CX Codex ★ 1,167repo stars add-pdf-viewer add-pdf-viewer configures a native PDF viewer wrapper for HTTPS links and file:// URIs in Power Platform mobile projects. CX Codex +1 ★ 1,167repo stars

More in the catalog

Project sponsors

Companies that keep this analytics open