plugins/code-apps/skills/add-sharepoint/SKILL.md
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.
npx skillsauth add microsoft/power-platform-skills add-sharepointInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
📋 Shared Instructions: shared-instructions.md - Cross-cutting concerns.
References:
Two paths: existing lists (skip to Step 6) or new lists (full workflow).
Check for memory-bank.md per shared-instructions.md.
Ask the user:
If lists already exist: Skip to Step 6.
If creating new lists:
EnterPlanMode, present the list designs with columns and typesExitPlanModeSee 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.
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 for Find-SimilarLists, Compare-ListSchemas, and Get-ListSchema functions.
Present findings to user with AskUserQuestion:
Get explicit confirmation before creating. Use safe functions from list-management-reference.md:
New-SharePointListIfNotExistsAdd-SharePointColumnIfNotExistsAdd-SharePointLookupColumn (for cross-list references)Find the SharePoint Online connection ID (see 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.
List available SharePoint sites the user has access to:
npx power-apps list-datasets -a 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 npx power-apps list-datasets fails or returns no results:
npx power-apps logout, then retry — the CLI will re-prompt browser login.For each selected site, list the available lists and document libraries:
npx power-apps list-tables -a sharepointonline -c <connection-id> -d '<site-url>'
If npx power-apps list-tables fails or returns no results:
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.
SharePoint is a tabular datasource -- requires -c (connection ID), -d (site URL), and -t (list name):
npx power-apps add-data-source -a sharepointonline -c <connection-id> -d '<site-url>' -t '<table-name>'
Run the command for each list or library the user selected. The -d (dataset) is the SharePoint site URL from Step 7, -t (table) is the list/library name from Step 8.
Read sharepoint-reference.md before writing any SharePoint code -- column encoding, choice fields, and lookups have critical gotchas.
Common operations:
// 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 URLtable is the list display name for list operations_x0020_, special chars encoded)Use Grep to find specific methods in src/generated/services/SharePointOnlineService.ts (generated files can be very large -- see connector-reference.md).
npm run build
Fix TypeScript errors before proceeding. Do NOT deploy yet.
Update memory-bank.md with: connector added, site URL, lists/libraries configured (or created), build status.
tools
Configure the Canvas Authoring MCP server for the current coauthoring session. USE WHEN "configure MCP", "set up MCP server", "MCP not working", "connect Canvas Apps MCP", "canvas-authoring not available", "MCP not configured", "set up canvas apps". DO NOT USE WHEN prerequisites are missing — direct the user to install .NET 10 SDK first.
development
Use when the user asks to "set up authentication", "add login", "add logout", "add sign in", "enable auth", "add role-based access", "add authorization", "protect routes", "configure identity provider", "configure Entra ID", "configure Entra External ID", "configure OpenID Connect", "add OIDC", "set up SAML", "set up WS-Federation", "set up local login", "add username password", "add Facebook login", "add Google sign in", "add Microsoft Account", "set up invitation login", or otherwise wants to set up authentication (login/logout) and role-based authorization for their Power Pages code site using any supported identity provider (Microsoft Entra ID, Entra External ID, OpenID Connect, SAML2, WS-Federation, local authentication, Microsoft Account, Facebook, or Google).
development
Creates, updates, and deploys Power Apps generative pages for model-driven apps using React v17, TypeScript, and Fluent UI V9. Orchestrates specialist agents for planning, entity creation, and code generation. Use it when user asks to build, retrieve, or update a page in an existing Microsoft Power Apps model-driven app. Use it when user mentions "generative page", "page in a model-driven", or "genux".
development
Creates a new Power Pages code site (SPA) using React, Angular, Vue, or Astro. Guides through the full process from initial concept to deployed site: requirements discovery, scaffolding, component planning, design, implementation, validation, and deployment. Use when the user wants to create, build, or scaffold a new Power Pages website or portal.