Skip to content
Development
Skill

/add-sharepoint

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.

From plugin
power-platform-skills
1.1k110 skills25 agents5 MCP

Claude Code

$ npx -y skills add microsoft/power-platform-skills --skill add-sharepoint --agent claude-code

SKILL.md

add-sharepoint.SKILL.md
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](../../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 (tables and/or actions) → 10. Configure → 11. Build → 12. Update Memory Bank

---

Step 1: Check Memory Bank

Check for `memory-bank.md` per [shared-instructions.md](../../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.

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:**

$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

Discovering sites and lists (Steps 7–8) needs a SharePoint connection ID on every CLI version: `pa connection list-datasets` and `list-tables` don't find or create connections the way `pa app add data-source` does on CLI 1.3.0+ (see [connector-reference.md](../../shared/connector-reference.md#connections)).

1. Run the `/list-connections` skill, filtered with `--search sharepointonline`. 2. Exactly one SharePoint connection: use its connection ID. Several: ask the user which one to use. 3. None: create one after asking the user.

  • **CLI 1.3.0+:** SharePoint supports single sign-on, so with the user's OK run:
     pa connection create --connector shared_sharepointonline --use-sso

It creates the connection silently with the user's account and prints `Connection ID: <id>`.

  • **Older CLIs, or if the user wants a different sign-in type:** follow [Create a connection with the user](../../shared/connector-reference.md#create-a-connection-with-the-user), then repeat step 1.

Step 7: Discover Sites

List available SharePoint sites the user has access to:

pa connection 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 connection list-datasets` fails or returns no results:**

  • Auth error: Run `pa auth login` (or `power-apps login` on `power-apps`-only projects), then retry.
  • 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:

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

**If `pa connection 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 supports both tables and actions, so say which one you're adding. Pass the connec

Read more
@microsoft
Ships withpower-platform-skills

Plugins from Microsoft that teach AI assistants, such as GitHub Copilot and Claude Code, to build on Power Platform.

1.1k110 skills25 agents5 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
1.1k
Star history of microsoft/power-platform-skills on GitHub, a chart by star-history.com

Other skills on power-platform-skills.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills13d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react4d252k
@facebook@facebookInstall Skill

Questions about add-sharepoint.

Which coding agents can use add-sharepoint?
add-sharepoint installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.