plugins/code-apps/skills/add-dataverse/SKILL.md
Adds Dataverse tables to a Power Apps code app with generated TypeScript models and services. Can also create new Dataverse tables. Use when connecting to Dataverse, adding tables, creating schema, or querying Dataverse data.
npx skillsauth add microsoft/power-platform-skills add-dataverseInstall 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 tables (skip to Step 5) or new tables (full workflow).
Check memory bank for project context. Ask the user:
account, contact, cr123_customentity)If tables already exist: Skip to Step 5.
If creating new tables:
contact for people, account for organizations)EnterPlanMode, present ER model with tables, columns, relationships, and creation orderExitPlanModeSee api-authentication-reference.md for full details.
az account show # Verify Azure CLI logged in
# Find your Dataverse environment URL:
# In make.powerapps.com → Settings → Developer resources → Web API endpoint
# It looks like: https://<org-name>.crm.dynamics.com/api/data/v9.2/
# Use the base URL: https://<org-name>.crm.dynamics.com
$api = Initialize-DataverseApi -EnvironmentUrl "https://<org>.crm.dynamics.com"
$headers = $api.Headers
$baseUrl = $api.BaseUrl
$publisherPrefix = $api.PublisherPrefix
Requires System Administrator or System Customizer security role.
Always query existing tables first before creating:
$existingTables = Invoke-RestMethod -Uri "$baseUrl/EntityDefinitions?`$filter=IsCustomEntity eq true&`$select=SchemaName,LogicalName,DisplayName" -Headers $headers
See table-management-reference.md for Find-SimilarTables, Compare-TableSchemas, and Build-TableNameMapping functions.
Present findings to user with AskUserQuestion:
Get explicit confirmation before creating. Create in dependency order:
Use safe functions from table-management-reference.md:
New-DataverseTableIfNotExistsAdd-DataverseColumnIfNotExistsAdd-DataverseLookupIfNotExists (from data-architecture-reference.md)For each table:
npx power-apps add-data-source -a dataverse -t <table-logical-name>
Can add multiple tables by running the command for each one.
The command generates:
src/generated/models/{Table}Model.ts -- TypeScript interfaces, plus {Table}FileColumnName, {Table}ImageColumnName, {Table}UploadColumnName union types if the table has file/image columnssrc/generated/services/{Table}Service.ts -- CRUD methods (create, get, getAll, update, delete) plus upload, downloadFile, downloadImage, deleteFileOrImage if file/image columns existShow the user a usage example:
import { AccountsService } from "../generated/services/AccountsService";
const result = await AccountsService.getAll({
select: ["name", "accountnumber"],
filter: "statecode eq 0",
orderBy: ["name asc"],
top: 50
});
const accounts = result.data || [];
Key rules:
AccountsService.getAll()), not fetch/axiosresult.data for actual datanpm run build
Fix TypeScript errors before proceeding. Do NOT deploy yet.
Record which tables were added (or created), generated files, and any schema notes.
testing
Use this skill when the user wants to enable, disable, turn on or off, opt out of, opt in to, or check the status of power-pages telemetry / anonymous usage data. Triggers: "disable telemetry", "turn off telemetry", "opt out of telemetry", "stop collecting usage data", "enable telemetry", "telemetry status".
development
Integrates Power Pages generative-AI summarization APIs (PREVIEW) into a Single Page Application (SPA) site — the Search Summary API and the Data Summarization API — on any record-detail or list page. Generates per-target service code (CSRF-handled) and AI site settings; delegates Web API settings, table permissions, and web roles to `/integrate-webapi` and `/create-webroles`. Use whenever a user wants AI/Copilot output that condenses Dataverse content on a Power Pages site — an AI summary, AI-generated overview or "key insights" across a record or list, a search-results summary, a case/incident summary, or recommendation-chip refinement — even when phrased as "AI-generated paragraph", "insights", or "overview". Do NOT use for: generative pages in model-driven apps (use the model-apps `genpage` skill), Copilot Studio agents/chatbots, summarizing documents or PDFs, Power BI dashboards, plain keyword search with no AI summary, or plain Dataverse CRUD (use `/integrate-webapi`).
tools
Sets up a Power Platform Pipeline for automated Power Pages deployments. Power Platform Pipelines is Microsoft's native CI/CD tool built into the Power Platform — no external infrastructure required. Use when asked to: "set up ci/cd", "create pipeline", "setup pipeline", "set up power platform pipelines", "create power pipelines", "automate deployments", "set up automated deployment", "create deployment pipeline", "use power pipelines". Also handles: "set up github actions" or "set up azure devops pipeline" (shows coming-soon guidance for those platforms).
development
Runs a guided, end-to-end security review of a Power Pages site and consolidates every finding into one HTML report covering the live site, browser headers, firewall, authentication, and role-based permissions. Use when the user wants a full security review, a release-readiness check before publishing, an access-and-config check during development, live site monitoring, or asks open-ended questions like "review my site security", "is my site safe to ship", "do a security check", "monitor my site" — even if they do not name the individual checks.