| name | deploy-code-app |
| description | Build a Power Apps Code App and push it into a Dataverse solution via the npm power-apps CLI, resolving the solution GUID from a human-readable unique name. Use when asked to "deploy the Code App", "push the app into a solution", "publish the Code App", or "ship the app to Dataverse". |
| metadata | {"author":"chuckytesla","version":"1.0.0","argument-hint":"<schema.json|schema.yaml> [--solution <uniqueName>] [--dry-run] [--skip-build]"} |
Deploy a Power Apps Code App into a solution
Publishes the built Power Apps Code App
into a Dataverse solution. This is the last step of the flow — run it after the app is scaffolded
(scaffold-code-app), the tables are scaffolded into the solution (dataverse-scaffold-tables), the
data sources are wired in (dataverse-add-data-source), and the build is green (npm run verify).
power-apps push needs the solution's GUID (--solution-id), but you should never have to find or
paste a GUID — push.mjs resolves it from a human-readable solution unique name exactly
the way dataverse-scaffold-tables does: it reuses the same npx power-apps login sign-in (via the
shared ../lib/dataverse-client.mjs) and looks the GUID up with
/solutions?$filter=uniquename eq '<uniqueName>'&$select=solutionid.
The skill is a generic engine — the solution and schema file are inputs you provide; nothing
project-specific is baked into the skill.
Inputs (provide, derive, or ask)
| Input | How it's used | If unknown |
|---|
| Solution unique name | resolved to a solution-id GUID, then push --solution-id <id> | Read solution.uniqueName from the Dataverse schema file you pass; else --solution <uniqueName>; else ask the user (the unique name, never the GUID). |
In a normal flow the app should land in the same solution you scaffolded the tables into, so passing
that schema file is usually all you need. Never hardcode the solution — it belongs to the project.
Prerequisites
- Run from the Code App root (the folder with
power.config.json and package.json).
- Signed in: the
dataverse-scaffold-tables skill already ran npx power-apps login; re-run it if a
call reports an interaction/consent error. The signed-in account needs rights to push into the
target solution.
DATAVERSE_URL set in .env (same prerequisite as the Dataverse skills).
- The target solution already exists (scaffolded by
dataverse-scaffold-tables).
How to run
node .agents/skills/deploy-code-app/push.mjs path/to/schema.yaml --dry-run
node .agents/skills/deploy-code-app/push.mjs path/to/schema.yaml
node .agents/skills/deploy-code-app/push.mjs --solution myorg_MySolution
node .agents/skills/deploy-code-app/push.mjs path/to/schema.yaml --skip-build
Always do a --dry-run first to confirm the resolved solution, then run live. Under the hood it
runs npm run build, then npx power-apps push --solution-id <resolved GUID>.
The solution uniqueName is resolved (first match wins): --solution <uniqueName> →
solution.uniqueName in the schema file you pass → otherwise it errors and asks for one.
After deploying
- The CLI prints the published app URL — open the governed URL and confirm Entra sign-in works and
the app reads/writes Dataverse through its generated services.
- Re-running is safe: it rebuilds (unless
--skip-build) and pushes the new version into the same
solution.
Notes
- This skill does not create the solution — that's
dataverse-scaffold-tables. If the solution
isn't found, check the uniqueName or scaffold it first.
- Related skills:
scaffold-code-app (bootstrap the app), dataverse-scaffold-tables (create
tables + the solution, and sign in), dataverse-add-data-source (wire tables into the SDK),
dataverse-create-records (seed rows).