A plugin marketplace for GitHub Copilot and other AI agents that provides Power Platform development plugins, including reusable skills, agents, and commands for building and deploying solutions.
App Spec schema (app-builder)
The App Spec is the reviewable JSON contract between the interactive authoring flow and the
deterministic builder (scripts/build-model-app.js). Author it to this shape, lint it
(scripts/lib/spec-lint.js), then build it — never hand-write a builder.
Canonical example:
samples/app-spec.support-desk.json— 3 tables, 2 relationships, 3 views, 2 charts, 3 forms (with sub-grids), relational sample data. Read it first; it shows every section in use.app-spec.project-tracker.jsonshows an explicit form layout (tabs).Review the whole spec (data model + sitemap + form wireframes + page-intents + design contract) before approving the build:
node scripts/preview-app.js @<dir>/app-spec.json. For a single form wireframe:node scripts/preview-form.js @<dir>/app-spec.json <entityName>. The eval harness uses the same spec to grade per-stage structural facts offline — seeevals/model-apps/app-builder/EVAL_GUIDE.mdanddocs/architecture.md→/app-builder— build pipeline.
Modeling cheatsheet — read this before exploring anything else
This doc is the single source; everything the builder supports is here, so you should NOT need to read the SDK, the lint, or the engine to author a spec. Common asks → how to model them:
| You want… | Model it as | Section |
|---|---|---|
| An auto-numbered identity (WO-00001) that is the title | autoNumberFormat on primaryAttribute |
entities |
| An auto-number that is not the title | a column type: "AutoNumber" + autoNumberFormat |
entities |
| A plain many-to-many | ManyToMany relationship; sub-grid on either side |
relationships |
| N:N with attributes (role/date per link) | a junction entity + two OneToMany; $parents for sample rows |
relationships / sampleData |
| Client-side validation / defaulting | a webResources[] script + form events[] |
webResources / forms |
| "My …", "… this week", "not Completed/Cancelled" views | view filters[] (eq-userid, this-week, not-in) |
views |
| Records pre-set to a custom status reason | statusReasons[] on the entity + statusReason on sample rows |
entities / sampleData |
| A child grid on a parent form | subgrids[] (1:N or N:N — auto-resolved) |
forms |
| A simplified create dialog / read-only related card | forms[].formType QuickCreate / QuickView |
forms |
| A related record's card shown on a form | forms[].quickViews[] (lookup + a QuickView form by name) |
forms |
| A command-bar button that runs JS | commands[] (library + function; optional hidden/disabled) |
commands |
| A command drop-down menu of buttons | commands[].type: "FlyoutAnchor" + children[] |
commands |
| Show, hide, enable or disable an existing modern button | commandStates[] by rowId (from list-command-states.js; table scope only; needs --publish and exact approvals; advanced) |
commandStates |
| A dashboard of chart/list tiles | dashboards[] (tiles[] reference declared views/charts) |
dashboards |
| A dashboard in the app nav | a dashboard sitemap subarea in appShell (auto-pins it) |
appShell |
| A table in the app but not its navigation | app.tables (logical names; additive membership) |
app |
| Only selected Main forms offered by this app | app.mainForms (table → Main form names) |
app / forms |
The builder is idempotent and runs everything in one pass (no post-build scripts): tables, columns, relationships, web resources, views, charts, forms (+ sub-grids + JS handlers), commands, dashboards, the app, sample data (incl. multi-parent junction links + status reasons), and publish.
Top-level shape
{
"solution": { "uniqueName": "ContosoSupportDesk", "displayName": "Contoso Support Desk", "publisherPrefix": "new" },
"app": { "name": "Support Desk", "description": "Track tickets", "icon": "new_appicon" /* , "aiDescription": "…" — optional routing description */ },
"entities": [ /* tables — see below */ ],
"relationships": [ /* 1:N links — see below */ ],
"globalChoices": [ /* optional shared option sets */ ],
"webResources": [ /* optional JS/HTML/CSS for form logic */ ],
"views": [ /* saved queries */ ],
"charts": [ /* Choice-column charts */ ],
"forms": [ /* main forms — may wire JS event handlers */ ],
"appShell": { "areas": [ /* sitemap */ ] },
"sampleData": { /* optional, keyed by entity schemaName */ },
"ai": { /* optional — AI feature flags + row-summary config */ },
"personas": [ /* optional — one security role per persona (see below) */ ],
"roleGrants": [ /* optional — ADD privileges to a role you did NOT author (see below) */ ],
"languageCode": 1031 /* optional — LCID for Dataverse labels; defaults to the org's base language */
}
app.icon(optional) — the app tile icon. Must be a declared image web resource (png/jpg/gif/svg/ico inwebResources[]) so the app is self-contained on export/import. Omit it and the build generates a simple default SVG icon inside the solution — either way the app never depends on an arbitrary external/managed icon (which would fail to import into a new environment). The app's sitemap is also added to the solution automatically, and so is every generative page the build writes or keeps (a changed-only run asserts the pages it leaves as they are too): the add of the app brings its sitemap but never the pages its navigation opens, so each page is added on its own (a system solution such asDefaultholds them already). The icon is set when the app is created, and a rebuild cannot change it (the platform stores it once): whenapp.iconnames a web resource that is not the icon the app has, the build warns that it was not applied — change it in the app designer, or pointapp.iconat the web resource the app already uses. A spec with noapp.iconis never compared, so an icon a maker chose is left alone.app.nameandapp.description— the app's display name and the text on its tile. A rebuild applies a change to either on the existing app (on the push that already writes its navigation), where it used to leave the old text. The app is found by its unique name, which a rebuild never changes: a spec that pinsapp.uniqueName(a download does) renames the app, while one that does not derives the unique name fromapp.name, so a different name there is a different app. Only a non-blank text is written and only when it differs from the deployed one, so an omitteddescription, or the""a download writes, never blanks one a maker typed — and a text changed in Maker is put back to the spec's. Two cases leave the text as it is, and warn that it was not applied while the rest of the build goes ahead: an app that was never published (Dataverse takes no write to its name or description until it is — publish it in Power Apps and re-run), and a name or description that is localized (held as one text per language, or any other value that is not plain text), which a rebuild never replaces with one text: change it in Power Apps. Only that one text is held back: the SDK writes just the texts that changed, so the other text, and anapp.aiDescription, are applied as usual — a localized name beside a changed plain description writes the description alone and leaves every translation of the name as it is. A text that is not plain is never sent, even when the SDK's own read of the header fails (the build takes it off the copy it pushes); the HTTP client still refuses a write of one, withAPP_HEADER_NOT_PLAIN_TEXT, for a push the build did not make itself.app.newLook(optional, default off) — opt into the modern ("new look") shell for this app. Writes the per-appNewLookAlwaysOnsetting, which Dataverse describes as enabling the new look and hiding the user switch — so the result is deterministic rather than a per-user preference. It is a setting, not an appmodule column:navigationtypeis Single/Multi session and unrelated, and the other new-look definitions (NewLookOptOut,NewLookModernExperienceOct2023) both default to true and are user-facing toggles, so writing them would not give the author a dependable result. Scoped to the app and the solution, so it travels on export/import. Best-effort: this is a platform feature that rolls out by tenant. If the setting cannot be written the build still succeeds — the app is fully functional on the classic shell — but it warns and reportscreated.newLook: false, so a failure is never mistaken for success.app.headerNavigationRefresh(optional) — control the Wave 2 header and navigation refresh (public preview) for this app. The platform default is ON, not off. Verified against the real vendored bundle (offline, by capturing the writes a push issues): the SDK defaults the app artifact'sheaderAndNavigationRefreshtotrueand pushing a new app writes the setting to its ON value unprompted. So set this tofalseif you want the classic header and navigation — omitting it leaves whatever the platform chose, which for a new app is on. Both values are honoured:truewrites ON,falseactively writes OFF. Treatingfalseas "do nothing" would silently leave the feature on for an author who asked for it off. This is a different setting fromapp.newLookand the two are independent:newLookwritesNewLookAlwaysOn(the new-look shell), while this writesHeaderAndNavigationRefresh(the header and navigation redesign). Enabling one does not enable the other. Written through the SDK's dedicated API rather than a raw setting write, because the encoding is a trap: it is a Number tri-state where ON is'2', not'1', and writing'1'is accepted by the API and then silently fails to enable the feature. Delegating means the plugin cannot get it wrong. Best-effort, likenewLook: a tenant without the setting definition still gets a fully working app, with a warning andcreated.headerNavigationRefresh: "unknown"— never a silent success, and never a claim about a value that was not written. On successcreated.headerNavigationRefreshOutcomerecordscreated/updated/unchanged.app.theme(optional, Preview,minimumPluginVersion: "2.21.0") — the app's modern theme and header logo. Declare it only when the maker asks for branding (colours, a header colour, a logo); never add one on your own, and never pair it with fonts or New look the maker did not ask for.{ "minimumPluginVersion": "2.21.0", "app": { "name": "Field Service", "theme": { "basePaletteColor": "#0F6CBD", "appHeader": { "background": "#0F3D6E", "foreground": "#FFFFFF" }, "logo": { "webResourceName": "contoso_/images/logo.svg", "tooltip": "Contoso Field Service" } } } }Field Value basePaletteColora colour #RRGGBBthe palette is derived fromlockPrimarytrue/false— keepbasePaletteColoras the exact primary colourvibrancy,hueTorsionwhole numbers from -100 to 100 that tune the derived palette fonta font name (only when the maker names one) paletteexplicit palette slots, each #RRGGBB:darker70…darker10,primary,lighter10…lighter80appHeaderheader colours #RRGGBB:background(required),foreground, and the…Hover,…Pressed,…Selectedpairs of bothlogo{ webResourceName?, tooltip? }—webResourceNameis an existing image web resource (PNG, JPG, GIF, ICO, SVG) of the environment, never a URLAt least one field is required; any other key (raw theme attributes included) is refused. Omitted leaves the app's theme exactly as it is — nothing is read or written.
nullremoves the app's own theme override, so the app follows the environment's theme again. The theme is stored as a content-named version web resource (<prefix>_/apptheme/<hash>.xml) plus the app's theme setting, both added to the solution when the theme is set. An unchanged theme whose records are missing from the solution is not repaired silently: the build stops (APP_THEME_MEMBERSHIP_MISSING) and names the repair — add the version web resource (component type 61) and the app's theme setting to the solution, then run again. The theme is published with the app, and an app publication publishes every pending app change, not only the theme. After that publication the build reads the theme back once and finishes incomplete (APP_THEME_UNVERIFIED) when the app does not resolve it; a refused or unknown write stops asAPP_THEME_INCOMPLETEand is never sent again automatically.--verifychecks the saved and the resolved theme: that is API state, not proof of what a browser paints — check the header in the app itself. The logo is referenced, not owned: declare it inwebResources[]to create it (withexternal: trueto keep it on teardown); theme versions are never deleted. Download emitsapp.themeonly with--include-capabilities; see the capabilities doc (App theme and header logo) for what it refuses.app.uniqueName(optional, download-emitted) — the app module's real, immutable Dataverse uniquename (e.g.crba3_supportdesk). A downloaded spec carries it so a rebuild resolves the existing app by identity — even after you rename the displayapp.name— instead of creating a duplicate app. You normally never hand-author this: an authored create-fresh spec omits it, and the build derives the uniquename deterministically fromsolution.publisherPrefix+app.name. Download recovers the immutable name from the fetched SDK artifact, including an unpublished GUID-addressed app, and refuses when it cannot resolve identity; it never derives one from display name.app.tables(optional) — additional app table membership, independent of navigation:["task", "email"]. It is an array of non-empty logical names with no case-insensitive duplicates. A table need not be declared inentities[], but must exist by the app-shell phase; an unresolved name stops the build before any app write. A navigation table is already included, so listing it here is harmless but lint warns. Membership is additive: removing a name from the spec never removes an existing app component. Download emits hidden type-1 members here, sorted. A custom hidden table also goes toentities[]; a known non-custom hidden type-1 member does not, even when a view/chart/form references it, so rebuilding does not copy another solution's custom columns or relationships. Tables discovered only through view/chart/form components retain their existing schema-capture behavior. Membership-only stock tables do not need a primary-name column. A hidden type-1 table with unknown custom/stock status is also reference-only, with a loss note; schema is adopted only on an explicitIsCustomEntity === true, even with companion assets.app.mainForms(optional) — a per-navigation-table Main-form allow-list, by name:{ "minimumPluginVersion": "2.13.0", "app": { "name": "Work Items", "tables": ["task", "email"], "mainForms": { "contoso_workitem": ["Work Item"] } } }Each key must name an
Entitytable in this app's sitemap, ignoring case; a hiddenapp.tablesreference alone is not eligible. Each value is a non-empty array of distinct names, compared ignoring case and accents. A name resolves within (table, Main) to a declared form or an existing active Main form; missing, inactive or ambiguous names stop the build before an app write. A same-named QuickView/QuickCreate is a different identity and does not shadow a valid Main. A knownforms[].formIddoes not bypass active-name ambiguity; a newly created/reused id counts as a candidate even before the catalog reports it.{}restricts nothing. Empty lists are refused: an app with no Main member offers every form. Create is exact; existing-app updates only stop widening. Listed forms are added, other Main forms are not added, and none are removed. Existing extras produce a warning and fail--verify: remove them in Maker (app designer → table → Forms) or include them in the list. Every later app push re-supplies the directive; it is not stored as a server-side allow-list. Quick Create, Quick View and card forms, dashboards, views and charts are unaffected.app.mainFormsOnUpdate(optional,"addOnly"(the default) or"exact") andapp.pinDeclaredArtifacts(optional,true):{ "minimumPluginVersion": "2.21.0", "app": { "name": "Work Items", "mainForms": { "contoso_workitem": ["Work Item"] }, "mainFormsOnUpdate": "exact", "pinDeclaredArtifacts": true } }Only these forms on an existing app.
app.mainFormsadds the forms you list. To also take the table's other Main forms out of the app on an update, set"mainFormsOnUpdate": "exact"— ask the maker first, it is a removal from the app's membership (no form is deleted). It needs an unmanaged, published app; the build publishes only once Dataverse reads back exactly your list, and otherwise stops with the change saved and the app's publication owed.Pin the artifacts the spec declares.
"pinDeclaredArtifacts": trueadds the spec's own forms, views, charts and dashboards to the app explicitly — use it for a chart or view of a table that is not in the navigation. It only adds."exact"needsapp.mainFormswith at least one table and form (an empty list would mean "every form"). On an app that already exists it is listed as a destructive operation, one per table (the dry run lists it too), and refused without--allow-destructive; on a new app it removes nothing.--verifyreads an exact list strictly and fails a form outside it.pinDeclaredArtifactspins the spec's declared forms (except a Main form theapp.mainFormslist leaves out), views, charts and dashboards; it never removes. Neither field is stored on the app: download does not emit them, so an edited spec keeps them only if the maker keeps them. If the answer to a push's component pin is lost, the build reads the app, adds what is missing with at most one more push, or stops with a partial result — with or without these fields. This does not choose a default, an order or security roles. Lint warns when the list excludes the explicit default or firstentities[].mainFormOrderform. A user's remembered Main form is per table, not per app. Measured: membership changes after first publish did not reach the runtime form list within 89 minutes, even after validation and republishing; do not promise immediate runtime changes for an existing app. Download emits a list only for a non-empty strict subset of the table's active Main catalog whose member names are unique among its Main forms. Inactive or unclassifiable pins are named in not-round-tripped notes; an encodable active restriction is still preserved. Empty/full active membership is omitted, with a note for the empty case. Form layouts themselves are not reconstructed. Download is a server-current edit snapshot, including saved unpublished app/sitemap changes. Navigation, table classification and Main membership use that same current layer;--verifyinstead checks the published layer that users consume. All modeled navigation targets (entity, generative page, URL, dashboard and custom page) and their occurrence counts must match. If those multisets disagree, or the SDK sitemap is missing, download refuses the mixed snapshot: publish the app, then download again.Capability floor: set
minimumPluginVersion: "2.13.0"or newer whenever usingapp.tablesorapp.mainForms("2.21.0"withapp.mainFormsOnUpdateorapp.pinDeclaredArtifacts); lint warns without it. Download adds that floor when it emits either field and retains a higher authored floor. The 2.12 consumer's existing version gate refuses such a spec instead of silently ignoring membership instructions it cannot build.Capability floor 2.21.0: set
minimumPluginVersion: "2.21.0"or newer whenever a spec uses option values ({ "value", "label" }),dateTimeBehavior,isSecured, a table'ssearchEnabled/changeTrackingEnabled/duplicateDetectionEnabled, orfieldSecurityProfiles[]; validation warns without it, because an older plugin ignores or rejects these fields. Download adds that floor when it writes any of them.app.aiDescription(optional) — the app's routing description: what an agent or router reads to decide whether this app is the right place for a request. It is separate fromapp.description, the text on the app tile, and maps to the platform'sappmodule.aiappdescriptioncolumn. Write who the app is for, the tasks it covers, what it deliberately excludes and — when sibling apps expose the same tables — how to tell them apart (see Descriptions below). Absent means "leave it alone": the platform can write this text itself, so the build writes the field only when the spec sets it (at create, or on an existing app when the value differs) and never blanks it. A download carries it back when the app has one, and--verifychecks the deployed value whenever the spec sets one. Changing it on an app that was never published halts the build (app-header-unpublished): Dataverse refuses a write to a never-published app's name, description or routing description, so publish the app in Power Apps, then re-run. On a published app, a change to those texts saved in Maker and not yet published is kept: the build's push is saved with it. If the app changes while the build runs, the push is refused as a concurrent edit (version-conflict): download the app again and rebuild, which never overwrites the other edit. While the app's name or description is localized (or otherwise not plain text) that text is left as it is, and this is still applied: the SDK writes only what changed, so the routing description is written alone. Rules: a non-empty string of at most 1,048,576 characters, the column's maximum.languageCode(optional) — the LCID stamped on the Dataverse labels the build creates: data-model labels (table, column, choice, status reason, relationship and alternate-key display names) and form, dashboard and sitemap labels. The serializers used to hardcode 1033 with no caller override; they now take the authoring language, so a non-English build no longer produces translated columns next to English form labels. Normally omit it: the build reads the organization's base language (organization.languagecode) and uses that, which is always a language the org has provisioned. Set it only to deliberately author labels in a different provisioned language than the org default;--language-code <lcid>overrides it for a single run.verify-model-app.jstakes the same flag, and a build run with it needs it there: the build writes a form's tab and section captions in that language, and--verifyholds them to the language it is told (the flag, else this field, else the organization's base language) — so without the flag, or this field pinned in the spec, such a form is held to the organization's language and its captions cannot be confirmed: they are reported missing, or, when the form's read carries no label in that language, looked up in a translation export (below). (The build's own--verifyis told the language the build used.) When no language can be established at all — the organization cannot be read — those captions are listed as unverified, neither passed nor failed. A caption compared in a language the environment's form read does not carry is read from a translation export of the app's solution instead: the platform decides which languages' labels the FormXML it returns carries (a form built with Spanish captions in an English-language organization reads back with its labels in English only), and the export is the one read that carries them all. It is one request, made only when such a caption is there to check; the captions it cannot settle stay unverified. If the organization has not provisioned the LCID you pin, the build stops at the start of the data-model phase and lists the ones it does have — Dataverse would otherwise accept the table and Choice labels (silently storing them under the org's base language) and then reject the firstDateTimeorMemocolumn, leaving a half-built data model. The check is best-effort: ifRetrieveProvisionedLanguagescannot be read, the build proceeds unchanged. Must be a positive integer LCID up to 65535 —1031, not"de-DE"and nottrue. An invalid value is rejected by validation, and a caller that bypasses validation gets a warning naming the discarded value rather than a silent fall-through. It is build-wide. One LCID is resolved and applied to every table, column, choice, status value, relationship and alternate key in the spec. There is no per-table language: anentities[].languageCodeis rejected, because the build cannot honour it — the SDK takes the language as a construction-time option. To label something in several languages, write the field itself as an LCID map (see Localized labels below); anentities[].localizedLabelsblock is rejected too, because the map belongs beside the name it labels rather than in a parallel addressing scheme. Emitted bydownload-model-app.jsonly if you pinned it yourself. It is deliberately never read from Dataverse: an LCID copied out of the source org would be re-applied verbatim when the spec is rebuilt somewhere else, which is exactly how a spec starts failing in an org that lacks that language. Leaving it absent lets every target org resolve its own base language. But a value you wrote is carried across a download from the previousapp-spec.jsonat that path, so a pin is not silently lost — losing it would leave newly created columns in the org default while the existing ones keep the pinned language, with no error anywhere.
Localized labels — one name, several languages
languageCode above sets the one language every plain label is written in. To label something in
several languages, write the field as a map keyed by LCID instead of a string:
"displayName": "Project Baseline" // one language
"displayName": { "1033": "Project Baseline", "3082": "Línea base" } // two
This works on every author-facing name the SDK can localize. Measured, per surface, against an organization with 1033 and 3082 provisioned — the table is the honest scope of the claim:
| Where | Field | Status |
|---|---|---|
entities[] |
displayName, pluralName |
verified — stored in both languages |
entities[].primaryAttribute |
displayName |
verified |
entities[].columns[] |
displayName |
verified |
entities[].columns[] |
inline Choice options[] |
verified |
relationships[].lookup |
displayName |
verified |
entities[].alternateKeys[] |
displayName |
accepted; not consistently reproducible |
globalChoices[] |
displayName, options[] |
REJECTED at the spec gate — see below |
Global choices are the exception, and it is not this plugin's doing. Measured: a global option set
created with a two-language label stores only the base language — including through a raw
POST /GlobalOptionSetDefinitions that bypasses the SDK entirely (0/4). Because Dataverse reports
nothing when it drops the language, a localized globalChoices[] label is rejected by validation
rather than sent: accepting it would produce a green build with the author's second language silently
gone, which is the exact failure this feature exists to end. Use an inline Choice on the column
(columns[].options[], verified) when you need localized option labels, or set the global set's
labels in Maker. Plain-string global-choice labels are unaffected.
Why a map on the field, not a localizedLabels block. The label belongs beside the name it
labels. A table-level block cannot address a Choice option or a lookup's display name without
inventing a parallel addressing scheme, and it splits one value across two places that then drift.
An entities[].localizedLabels key is therefore not a supported shape.
Rules
- Keys are canonical positive integer LCIDs up to 65535 —
3082, not"03082"and not"es-ES". A language tag is rejected rather than guessed:es-ESis 3082 or 1034 depending on sort order, and guessing wrong would not fail — it would label everything in the wrong language. - Every value must be a non-empty string; an empty map is rejected (the SDK rejects one too).
pluralNamebecomes required beside a localizeddisplayName. The English fallback appends"s", which is not a plural rule in most languages — so the spec asks rather than inventing "Línea base del proyectos".- Omitting the spec's own
languageCodefrom a map is a warning, not an error. Dataverse serves the base-language label to every user whose UI language has none, so leaving it out usually means those users read a schema name — but a deliberately single-non-English label is legal. - Labels for all languages are written in one create call. That matters: a later single-language
PUTcan overwrite the base label even with merge semantics. - Every LCID you name must be provisioned in the organization, and the build halts if one is not.
It halts before it writes anything: the publisher and the solution are not created either.
This is the guard the feature depends on, not a nicety. Live-measured against a 1033-only org:
createTablecarrying{ "1033": …, "3082": … }returns success and stores only the 1033 label — Dataverse does not warn, error, or report the drop anywhere. Without the halt you would get a green build with the second language silently gone, which is the exact failure this feature exists to end. The check is best-effort in the same way the existinglanguageCodecheck is: an unreadableRetrieveProvisionedLanguagesleaves the build unchanged, and a spec with only plain string labels never pays the round trip.
Referencing a localized label. Anywhere the spec names an artifact by its label — sampleData
choosing a Choice option, or personas[].jobs[].surfaces[] naming a screen — any of its
languages resolves to the same artifact. One option, one value, several names. So one text must not
name two options of a column: validation refuses it when you cannot see it on the line — one of the
two is a label of several languages the other does not match in every language, or they are in different
languages ("Open" beside { "3082": "Open" }) — and warns when you can: two equal plain strings, or
two identical localized labels, the same text in each of the same languages ({ "1036": "Ouvert" } twice,
or { "1033": "Abierto", "3082": "Abierto" } twice — how Dataverse holds two options labelled "Abierto" in
Spanish on an English environment: it fills the base language in with the same text). Dataverse allows
that duplicate; a reference to the text resolves to the first of the two.
Round-trip. download-model-app reconstructs localized labels from Dataverse: a table, plural,
column, lookup, alternate key or option labelled in several languages comes back as a map. One labelled
in a single language comes back as a plain string when that language is the download's authoring
language (--language-code, else the languageCode the spec already on disk pins, else the environment's
base language — so no ordinary spec changes shape), and as a one-entry map when it is another:
{ "3082": "Pedido" } for a table labelled only in Spanish, the base language of its environment,
downloaded in English with --language-code 1033; { "1033": "Note" } for an English-only column of an
English environment downloaded with --language-code 3082. (Dataverse fills the base language in, with the
same text, when a label is created in another language only, so the one language a label holds alone is the
environment's base language.) A plain string is written in the language a rebuild resolves, so that label used to
come back as an English label with Spanish text; a map keeps its language, and a rebuild into an
environment that does not have it stops at the start of its data model and names it (see the rule above)
instead. Every plain label in a downloaded spec is in the authoring language, as its navigation titles
are: a rebuild into an environment whose base language is another writes them in that one, unless the
spec pins languageCode or the build is given --language-code. Two Choice options a maker labelled with
the same text keep their labels, and the column its type, when the two labels are identical in every language
they hold (a duplicate validation warns about) — the way Dataverse holds them; when the text is in two
languages — an English "Open" on one option, a Spanish "Open" on another — the spec can hold those two
options only as plain strings, so they alone are written that way, and the download warns that their labels
could not keep their language. A clash the spec cannot hold at all — two labels of several languages that
differ in some language, so which option the text means depends on the language — leaves the column without
a type, and the download's warning names the clash. A lookup that sets no
label is labelled like the table it points at (see lookup.displayName below), so the download leaves a
lookup's label out only when that label is the lookup's own, language for language: an English "Contact"
on a lookup to a table labelled only in French "Contact" is written out. The download emits
pluralName alongside a localized displayName, so its own output re-validates, and beside a plain one
whenever it is not the "<displayName>s" a rebuild would derive — "Tag Catalog" for "Tag" comes back,
"Tags" does not (it is the default).
A navigation label or title is always a plain string (the spec has no map form for one), read in the
language a rebuild writes it in: --language-code, else the languageCode the spec already on disk pins,
else the environment's base language. When none of the three gives one — the base language could not be
read — the download writes nothing ("code": "navigation-language-unknown") rather than guess one: run it
again, or pass --language-code <lcid> (it decides the language the titles are read in and is not written
into the spec, so a language other than the environment's base language must be passed to the build and to
verify-model-app.js too, or pinned as the spec's languageCode, or a rebuild writes those titles as
base-language titles). A title a node holds only in another language is not in the spec, and a rebuild into the
same environment leaves it as it is.
description — write one on everything that takes one
description is optional on every artifact below and recommended on all of them. It is written
to Dataverse at create time, so it costs nothing extra and needs no backfill pass.
Accepts description |
Notes |
|---|---|
entities[] · entities[].columns[] |
The highest-value ones — table and column names are cryptic (new_col3) without them |
views[] · charts[] · forms[] · dashboards[] |
What the artifact is for, not what it contains |
businessRules[] |
Why the rule exists — the logic itself is already visible |
solution · globalChoices[] · webResources[] · app.description |
Accepted by the spec but NOT written to Dataverse (you get a build warning, never silent loss) — the vendored SDK's create surface has nowhere to put them:
commands[]—createArtifact('command', …)drops the field.Customercolumns —createCustomerColumn's payload is only{ Lookup, OneToManyRelationships }.
Not accepted at all, deliberately: personas[]. The SDK stamps its own ownership marker into
a security role's description and then requires an exact match on it before it will touch that
role, so a custom description would make the SDK disown the role it created and refuse to update it.
Why it matters beyond tidiness. A description is the only durable, machine-readable statement of intent an app carries. Names say what a thing is called; descriptions say what it is for. When an agent later inspects an app it did not build — to extend it, debug it, or answer a question about it — descriptions are the grounding it has. Write them for that reader.
Good: "Severity 1-5; drives the escalation rule and the SLA clock."
Weak: "The priority column." (restates the name and adds nothing)
Rules: must be a non-empty string, max 2000 characters (the Dataverse ceiling — the platform
truncates silently past it, so it is rejected at author time instead). Omit the field entirely rather
than setting ""; every write site omits an absent description, so a rebuild never blanks one a
maker typed in the UI.
Download/read-back: download-model-app preserves descriptions on artifacts it can already
reconstruct as rebuildable spec (solution, entities[], entities[].columns[], dashboards[]).
Views, charts, forms, business rules and global choices are not fully reconstructed yet, so their
deployed descriptions are exposed under descriptionInventory for inspection only rather than as
partial rebuildable artifacts (the command-bar buttons of the app's tables are listed there too, by
table and label). Null or absent Dataverse descriptions are omitted, never written as
"".
Rebuild behaviour: a description is written at CREATE, and is additionally reconciled on an
artifact that already exists for views, charts and the app itself (app.description) — so authoring
one on a table whose Dataverse-generated "Active <Plural>" view the build reconciles onto still
lands, and an edited app.description reaches the app on the next build (a never-published app, or one whose
description is localized, is left as it is with a warning — see app.name and app.description above). These write only when the spec
explicitly sets a description and it differs from the deployed value, so an ordinary rebuild
issues no extra write and an omitted description never blanks text a maker typed in the UI.
Everything else is create-only — the description reaches Dataverse when the artifact is first
created and is not revisited: tables, columns, the solution, global choices, webResources[],
forms, dashboards and business rules. Adding a description to one of those after
it exists is accepted by validation, builds green, and does not change the deployed artifact.
The routing signal goes in app.aiDescription, not app.description. An orchestrator deciding
whether this app is the right place to send a request needs more than the app tile can hold, so the
routing text has its own field (appmodule.aiappdescription), leaving app.description short. Write
who the app is for, the tasks it covers, what it deliberately excludes, and — when two apps expose
the same tables — how to tell them apart. Sibling apps over the same data are precisely where a
purpose-only description fails.
Good: "Project-manager and portfolio work: planning projects, assigning and reprioritizing work, and managing sprints, budgets, risks and releases. Prefer the My Work app when the request is about the signed-in contributor's own assigned items."
Weak: "An app for managing projects." (no persona, no scope boundary, nothing to disambiguate)
It follows its own rules, not the ones above: up to 1,048,576 characters, and one string for
every language — the column is not localizable, so it takes no LCID map. Like app.description
it is reconciled on an existing app: a rebuild writes it whenever it differs from the deployed
value. A download copies the deployed value into the spec — including one the platform generated —
and from then on the spec owns it: if the platform later rewrites it, --verify reports the
difference and the next full build restores the spec's value (a --changed-only apply compares the
spec with its last snapshot, not with the deployed row, so it does not notice).
entities[]
An app with no tables of its own — one whose navigation holds only generative pages, dashboards over
tables the environment already has, or URLs (an app made with apps.js create --page-id is one) — is a
valid spec with "entities": []. The build makes it (a navigation of pages only is built pages first), and
download-model-app.js, --verify and teardown take it as they take any other spec. A spec with no table
and no navigation entry has nothing to build an app from, and is refused: at least one entity is required.
{
"schemaName": "new_ticket", // publisher-prefixed; logical name is its lowercase
"displayName": "Ticket",
"pluralName": "Tickets", // optional (defaults to "<displayName>s")
"hasNotes": true, // optional — enables the Notes/timeline on the table + form
"quickCreate": true, // optional — enable "Allow quick create" (IsQuickCreateEnabled)
// on the table, so the inline "+ New" (from a lookup or a
// sub-grid's + New) opens a Quick Create form instead of the
// full form. Auto-derived as true when you author a
// forms[] entry with formType "QuickCreate" for this entity
// (authoring the form but leaving the flag off is a footgun —
// the form exists but is never surfaced), so set it
// explicitly only when you want the flag WITHOUT a custom
// Quick Create form (the platform's default one is used).
"vectorIcon": "new_ticketicon", // RECOMMENDED — the table's OWN icon (what the modern app
// designer + app nav render for the table). Assign one
// per CUSTOM table by default so the nav shows a glyph,
// not the generic table cube. Must be a declared SVG web
// resource (webResources[] type "svg").
// NOTE: this is a web-resource name, NOT a Fluent token —
// an unresolvable value leaves the designer's property
// pane stuck on a glimmer, so it is hard-validated.
// (Author a clean, original single-path Fluent-style SVG;
// see references/authoring-flow.md → Table icons.)
"iconDescription": "a briefcase", // RECOMMENDED alongside vectorIcon — what the glyph DEPICTS,
// in plain language ("an outlined clipboard with a
// checkmark", "a laptop with a clock overlay"). Documentary
// only: never written to Dataverse. It is what the user
// approves in model-app-plan.md BEFORE the SVG is drawn, so
// a Fluent TOKEN name (Briefcase, ClipboardTask) is REJECTED
// — the SVG is authored fresh, and a token the user has not
// seen tells them nothing. Also valid on a sitemap area,
// group, or non-entity subarea (an entity subarea renders
// the TABLE's icon, so describe it on the table).
"icon": "new_ticketicon_png", // optional — raster fallback (png/jpg/gif/ico web resource,
// → IconMediumName). Prefer vectorIcon for the modern look.
"existing": true, // optional — this table PRE-EXISTS (system table like
// account/contact, or a custom table owned elsewhere).
// The build reuses it; teardown NEVER deletes it. System
// tables are auto-detected and skipped by teardown even
// without this flag — set it for a REUSED CUSTOM table
// you want protected from teardown. ALSO skips
// default-view enrichment (which replaces a view's
// column set) — override with enrichDefaultViews: true.
"description": "A customer support ticket, from intake through resolution.",
// RECOMMENDED — see "description" below. Written to
// Dataverse at create time; the grounding an agent reads
// when it later inspects an app it did not build.
"primaryAttribute": { "schemaName": "new_subject", "displayName": "Subject" },
// primary can be auto-numbered (the number IS the record identity — recommended for orders/cases):
// "primaryAttribute": { "schemaName": "new_ordernumber", "displayName": "Order Number", "autoNumberFormat": "WO-{SEQNUM:5}" },
// and its length can be set (1–850 characters; when omitted the build asks for 100, as before) — see "Primary column length" below:
// "primaryAttribute": { "schemaName": "new_subject", "displayName": "Subject", "maxLength": 120 },
"columns": [
{ "schemaName": "new_priority", "displayName": "Priority", "type": "Choice", "options": ["Low","High"],
"description": "How urgently the ticket needs attention." }, // RECOMMENDED — see below
{ "schemaName": "new_duedate", "displayName": "Due Date", "type": "DateTime" },
{ "schemaName": "new_score", "displayName": "Score", "type": "Integer",
"visualization": "RadialDial" }, // optional — CUSTOM GRID RENDERING (preview), below
{ "schemaName": "new_externalref", "displayName": "External Reference", "type": "Text",
"isValidForUpdate": false } // optional — WRITE-ONCE after creation, below
]
}
- Unknown table keys are REJECTED, not ignored. A table accepts exactly the keys above
plus
statusReasons/alternateKeys/mainFormOrder. Anything else — a misspelledpluralname, or alanguageCode/localizedLabelsasking for a per-table language or a parallel label block — fails validation naming the alternative, rather than validating clean and being dropped from the build.primaryAttributetakes exactlyschemaName,displayName,autoNumberFormat,requiredandmaxLength— the same rule one level down: amaxlength,autonumberFormat,requiredLevelortypethere is refused, naming the key it most likely meant (the name column is always text, so it has notype). - Column
type:Text · Memo · Choice · MultiChoice · Boolean · Money · DateTime · Integer · BigInt · Decimal · Double · File · Image · AutoNumber · Customer. Lookups are NOT columns — declare aOneToManyrelationship instead. - Per-type options (all optional except an AutoNumber column's
autoNumberFormat):required: true/"recommended"/false; Text/Memo →maxLength; Text →format(Text/Email/Url/Phone); numeric →minValue/maxValue/precision; Integer → alsointegerFormat(None/Duration/TimeZone/Language/Locale— e.g. render a raw minute count as a Duration picker instead of a plain number); DateTime →dateFormat(DateOnly/DateAndTime) anddateTimeBehavior(UserLocal/DateOnly/TimeZoneIndependent); any type but Customer →isSecured; Choice/MultiChoiceoptions[]items → a label or{ "value", "label" }(the last three: see Conditional features below); Boolean →trueLabel/falseLabel/defaultValue(explicittrueorfalse— see note below); File/Image →maxSizeKb, Image →isPrimaryImage; AutoNumber →autoNumberFormat(required on an AutoNumber column, e.g."C-{SEQNUM:5}"— see the AutoNumber note below); Calculated/Rollup →source: "Calculated"|"Rollup"+formula. - Downloaded column options are canonical, not a record of which defaults the author typed.
Text format/length, Memo length, Integer range/format, Decimal/Double range/precision, Money range,
Boolean labels, DateTime format and AutoNumber masks are reconstructed, as are the primary name
column's length/mask. Options equal to the bundled SDK's create defaults are omitted: Text
length 100/format
Text, Memo length 2000, Integer range -2147483648..2147483647/formatNone, Decimal/Double range -100000000000..100000000000/precision 2, Money range 0..1000000000/precision 2, BooleanYes/Noand DateTimeDateAndTime. A primary name length stays explicit even at 100: some environments override the length in a table create, and the post-create correction runs only whenprimaryAttribute.maxLengthis present. A missing or malformed detail read is named on stderr; the typed column remains, but a fresh build cannot recover the missing option. Money precision is not generally portable. The SDK always createsPrecisionSource: 2(transaction currency). Download retains numericPrecisionmetadata only for source 2, and even then the effective precision depends on the transaction currency's decimal places in the target; equal numeric metadata does not prove currency equivalence. Source 0 (column precision), source 1 (organization pricing), and missing/malformed/unknown sources are diagnosed with precision omitted, without losing the typed Money column or its range. Configure the required source in Power Apps on the target rather than relying on this spec to recreate it. See Money PrecisionSource. This does not reconstructrequired, BooleandefaultValue,isValidFor*, visualization, BigInt ranges or DateTime behavior. A non-primary AutoNumber's custom length/format cannot be authored through this spec; its number mask is carried. - Write permissions (optional, every column type except Customer):
isValidForCreate/isValidForUpdate/isValidForRead— seeisValidForCreate / isValidForUpdate / isValidForReadbelow. defaultValueandintegerFormatare boolean-typed / enum-typed spec-gate checks, not free-form.defaultValuemust be a literaltrue/falseand only applies to aBooleancolumn;integerFormatmust be one of the five literals above and only applies to anIntegercolumn (notBigInt/Decimal/Double/Money, even though they share the same numericminValue/maxValue/precisionoptions) — either mismatch is rejected by name at validation time rather than surfacing as a mid-build SDK error.requiredistrue,falseor"recommended"— and converges on rebuild only when authored explicitly.trueis DataverseApplicationRequired(Business Required),"recommended"isRecommendedandfalseisNone. Any other value —"ApplicationRequired","true","required","Recommended",1,null— is refused at validation, on a column and onprimaryAttributealike, naming the table, the column and the value (the build would otherwise read it as not required, and write that over an existing column's level); omit the key instead to leave an existing column as it is. For a new column,truecreates DataverseApplicationRequiredand"recommended"createsRecommended. For a column that already exists (including the primary/name column), a rebuild first reads its currentRequiredLeveland only writes when the explicit spec value differs. Ifrequiredis omitted, the build leaves the existing column alone instead of treating omission asNone, so it never silently demotes a field a maker already made Business Required. The primary/name column'srequiredis applied on a new table too: it is asked in the table's create, and because a plain text name column is stored not required whatever the create asks (an auto-numbered one keeps the level), the build's SDK reads the level back and sets it with one update. The build says the level was applied on create only once the SDK has confirmed it (forfalse, once it has seen the table created). When it cannot be confirmed the table still exists: the build stops (or, for a table found after the answer to its create was lost, or an existing table whose columns could not be read, warns —falsetoo, since nothing shows what the column holds), and running the build again finds the table and sets the level as it does for any existing column — it never creates the table twice.defaultValueandisValidFor*converge by re-assertion. A rebuild re-sends whichever of these fields the spec sets explicitly for an existing column; an omitted field leaves portal-set state untouched, exactly as forvisualizationbelow. A standaloneintegerFormatis compared first: an equal scalar format skips the SDK's read-mutate-write, while a different or unreadable one keeps that update path. When other capabilities are authored alongside the format, the existing combined update is still re-asserted.- Choice / MultiChoice need
options[](string labels) or aglobalChoicereference (seeglobalChoicesbelow). Customer is a polymorphic account/contact lookup. - AutoNumber can also be the primary column — put
autoNumberFormatonprimaryAttribute(above) instead of adding a separate column, so the generated number is the record identity. AnAutoNumbercolumn needs itsautoNumberFormat— a non-blank string such as"C-{SEQNUM:5}". One without it is refused when the spec is validated, before anything is built, naming the table and the column: the platform would create a plain text column instead, so writetype: "Text"for a plain text column. On the primary column the format stays optional: without one the name column is plain text. - Primary column length —
primaryAttribute.maxLength(optional; a whole number from 1 to 850, the most Dataverse allows for a table's name column — more is refused by Dataverse, so anything else is rejected at validation, for/genpageand/app-builderinput as well). Without it the build asks for 100 characters, the length it has always asked for, whether the name column is text or auto-numbered (autoNumberFormat). The table is created as before, with its name column alone (its other columns follow in a request of their own), and what an environment makes of the 100 asked can differ — some keep it, and some make a plain text name column 850 characters long whatever length is asked (100 and 120 both came back 850) while keeping the length asked of an auto-numbered one — and the build leaves a name column withoutmaxLengthas the environment made it, as before. A length you give is applied when the table is created: once everything else in the data model has been created (or as far as a build that stops got), the build reads the name column back and, where the environment did not keep the length, updates it to the value you gave. The length is fixed at that point: a rebuild never changes the name column of a table that already exists — neither to this value nor back to the default — because shortening a column that holds data can fail or lose text, and a rebuild must not undo a length someone widened in Maker. Like every column'smaxLength, it is not reconciled afterwards; to change it on an existing table, change it in Maker. If the length cannot be set after the create, the build reports a failedprimary column lengthstep that names the table, the length asked and the length the platform made, and goes on — or, when the data model stopped first, says so, and that a later run leaves the column as it is (the build's own automatic retry of a transient failure is not a later run: it sets the length the stopped attempt could not, and says so — to the table that attempt created, which it checks by the table's MetadataId first and then writes to by that id, so a table another maker deleted and made again in the meantime — even in the middle of the update — is left as it is, with a warning). One exception to "applied when the table is created": a table the build finds after its create — the answer to the create was lost, or another maker created the table first — is not written to, because nothing shows that this build made it. The build reads its name column's length once instead, and warns when it is not the length the spec asks for (or cannot be read). A build that stops because the table was created but cannot be read back yet (TABLE_METADATA_NOT_VISIBLE) warns that the length may not have been applied, since a re-run leaves an existing table's name column alone. - A key over the name column — give the column a
maxLength. A key may hold only so many bytes (2 for each character of text) and Dataverse refuses one that is too large: Microsoft Learn documents 900 bytes, and the platform's own answer on the environment this was measured on named 1,700. Some environments make a new name column 850 characters long whatever length the table's create asks for — 1,700 bytes by itself, so a key over that column alone is accepted there, and a key that holds any other column beside it is refused. When the spec gives the name column amaxLengthand a table'salternateKeys[]entry holds that column, the build makes the key after it has set the length — so the first build succeeds — and does not send it when the length could not be set: it stops with a message that says why and what to do instead of the platform's refusal. Keep the key within 900 bytes to be safe on every environment (at most 450 characters when the name column is its only column). Without amaxLengththe build leaves the column as the environment made it and makes the key with its table, so on such an environment the key is refused: give one. This holds for a key whosedisplayNamegoes out in one language: a string, or a language map that names exactly one language, whichever it is — the SDK sends either as one label, the same request, and where the key is made does not depend on the language the build writes in. A key labelled in several languages ({ "1033": "…", "3082": "…" }) is made before the length is set, because the update that sets the length reads the column with its labels, and Dataverse keeps only the base language of a create that comes straight after such a read. The exception is a key that holds the name column and another column where the environment made the name column too long for it (the key then cannot fit beside the column, and shortening the column is what lets it): the build reads the column's length once, before it asks for such a key, and makes the key after the length is set — with both labels, so the first build succeeds. A key labelled in several languages over the name column alone is made before the length is set whatever the column's length. Where the platform refuses a key made before the length is set for its size all the same, the first build stops there, and the build warns, naming the key. What the warning says depends on what the build can tell of the key's size. It counts the key's columns as it creates them, 2 bytes for each character of text — aTextcolumn at itsmaxLength(100 without one), anAutoNumbercolumn at 100 (the build gives it no other length) — and any other column at one byte, so the count is a minimum. When even that minimum is over 1,700 bytes at the length you give the name column, the key is proven too large: the warning says so, with its size, and that running the build again does not create it — take a column out of the key, or make its text columns shorter. Otherwise the count is inconclusive (a column that is not text can take more than one byte, and an environment may allow less than 1,700), so the warning promises nothing: running the build again may create the key, since the length is set as the build stops, if the name column at the length you give leaves room for it; if that run is refused the same way, compare Dataverse's error with the sizes of the key's columns. Labelling the key in one language changes where it is made, not its size. The stop for a key that waited for a length the build could not set says the same of the key: proven too large, no run creates it as the spec has it; otherwise, once the name column has the length you give (set it in Maker, or clear what stopped the build), running the build again may create the key, which the build does not promise. Nothing is said where the environment keeps the length asked and the key is made.
visualization — custom grid rendering (optional, PREVIEW)
Renders the column's value as a small graphic instead of plain text, in every grid and view that
shows the column — it is per-column metadata, not per-view, so you set it once here rather than
on each views[] entry.
| Value | Renders as | Best for |
|---|---|---|
RadialDial |
circular gauge filled to a percentage | a number over a known range (0–100) |
LineChart |
sparkline across several points | a text column of comma-separated numbers |
HeatMap |
horizontal bar coloured by value | a single number, or a choice value |
StarRating |
row of stars filled to the value | a whole number (0–5 by default) |
None |
plain text | explicitly clearing a renderer |
- Type-only. The renderers use built-in defaults (dial 0–100, stars 0–5); there are no tuning
parameters. Column-type compatibility is not validated — the pairings above are guidance, and
the platform does not enforce a clean "numeric only" rule (
LineChartis documented for a text column). A nonsensical pairing deploys and simply renders nothing useful. - Omitting is not the same as
None. An omitted column is left exactly as deployed; use"None"to actively clear a renderer set by an earlier build or by a maker in the portal. - Rebuild-safe. The value is re-asserted on every build, including for columns that already exist, and converges to a single configuration row.
- PREVIEW — not provisioned everywhere. Where the platform has not enabled it, the build
skips the visualization step (the column and everything else still deploy) and
verifyreports no divergence. Live-measured: the backingcontrolconfigurationstable was present on only 1 of 18 test environments. If a renderer does not appear, check the environment first — the same spec succeeds unchanged on a provisioned org.
isValidForCreate / isValidForUpdate / isValidForRead — per-verb write/read permissions (optional)
Governs which API verbs Dataverse allows against the column, independent of the table-level
security a personas[] role grants. The common case is write-once: a column that should be
populated at creation (an external system id, an intake source) and never touched again —
"isValidForUpdate": false blocks every later write, whether from a form, a flow, or the API,
without needing a business rule or a plug-in to enforce it.
{ "schemaName": "new_externalref", "displayName": "External Reference", "type": "Text",
"isValidForUpdate": false }
- All three are independently optional booleans — set only the ones you mean to constrain. Omitting all three leaves the column at the Dataverse default (valid for create, update, AND read).
falseis the entire point of the feature, and is honoured exactly liketrue. The spec validation and the build both use an explicit-value check (!== undefined), never a truthy check, specifically soisValidForUpdate: falseis never silently dropped the way a naiveif (value)guard would drop it.- Every buildable column type accepts these EXCEPT Customer. A
Customercolumn is created through a separate Dataverse API path (a polymorphic account/contact lookup) that carries no such option. Setting any of the three on a Customer column does not fail the build — it warns and the flag is silently not written, the same treatmentdescriptiongets on a Customer column elsewhere in this doc. - Rebuild-safe, by re-assertion (see the reconcile note above). Whichever of the three fields
the spec sets explicitly is re-sent on every build for an existing column, not just a newly
created one — so tightening
isValidForUpdatetofalsein the spec and rebuilding converges an already-shipped table, not only a fresh one.
entity sub-sections (optional)
"statusReasons": [ { "label": "In Review", "state": "Active" } ], // custom status values
"alternateKeys": [ { "schemaName": "new_emailkey", "displayName": "Email Key", "columns": ["new_email"] } ],
"mainFormOrder": ["Work Item", "Work Item — Summary"] // the Main Form Set order — see forms[] → "Which form a table opens with"
A download keeps unmanaged custom statusReasons with Active/Inactive state, label, color and
value (omitting value only when the build would assign the same number by index). Stock values
1/2, managed reasons and stock-table reasons below 100000000 are not re-declared. Other states or
incomplete metadata are named rather than fabricated. alternateKeys keep their schema names,
column sets and available display labels; managed keys are not re-declared. Status labels use only
the resolved download language (--language-code, the existing spec's languageCode, then the
environment base language), not the caller's UI language. A reason missing that translation is
omitted with a diagnostic, never relabelled from another LCID. A non-base-language download flag
is read-time only: pass the same flag on rebuild or pin languageCode in the spec.
A malformed or missing optional Keys array is diagnosed and recovers no keys, without dropping
the table, its primary name, typed columns or navigation. On rebuild an equal
status value/state/label in the authoring language (and color, when authored), or an equal key
name/column set, skips the insert. An unknown or conflicting answer keeps the existing
duplicate-protected create path: it is not an instruction to rewrite a conflicting deployed
definition.
Conditional features — read app-spec-schema-advanced.md when you use one
These fields are optional and situational: most apps use none of them, so their full field
reference lives in app-spec-schema-advanced.md rather than
here. This document stays the contract for everything an app always has.
Read the advanced reference when — and only when — your design uses one of these. The table
is deliberately here, in the document you always read, so the menu is never hidden: choosing a
capability is the step that must not be missed, and the /app-builder skill body carries the same
list with "reach for it when…" guidance.
| Field | What it is |
|---|---|
globalChoices[] |
shared option sets |
webResources[] |
client-side logic |
commands[] |
modern command-bar buttons |
commandStates[] |
show, hide, enable or disable an existing table-scoped modern button by its row id |
businessRules[] |
declarative form logic, no code |
businessProcessFlows[] |
guided, staged process on a table |
dashboards[] |
chart/list/iframe/web-resource tiles |
roleGrants[] |
extend a role you did NOT author |
businessProcessFlows[].securityRoles |
who may run a flow |
fieldSecurityProfiles[] |
confidential columns (columns[].isSecured) and who may read or change them |
views[].reconcile |
declared views and charts (reconcile: "declared" on a view or chart: the rebuild applies the spec's columns, filters, sort and joins), a table's Quick Find columns (entities[].quickFind), and a declared web resource's content (webResources[].reconcile) |
forms[].reconcile |
a declared form layout (reconcile: "declared" on a form: the rebuild places the spec's fields, spans, sections and field options and adds missing sub-grids, quick views and handlers, keeping every control the spec does not declare) |
dashboards[].reconcile |
a declared dashboard (reconcile: "declared" on a global dashboard: the rebuild applies the spec's tiles by key and its description, adds new tiles, and keeps every tile the spec does not declare) |
businessRules[].reconcile |
a declared business rule (reconcile: "declared" on a rule: created Draft under an id the build keeps, then activated; managed and proved whole, with keyed conditions and actions, OR logic, default values, error messages and recommendations; an existing rule is adopted read-only, never edited) |
businessProcessFlows[].reconcile |
a declared business process flow (reconcile: "declared" on a flow, with a key on every stage and step: created Draft with ids the build keeps, then activated; managed and proved whole, so a rename keeps a stage's or step's id; an existing flow is adopted read-only, never edited, and a removed or reordered stage or step is refused) |
createIdentity |
stable create ids for declared views and charts, on a new app only (createIdentity: "stable-v1"; a managed download writes it back with the declared views and charts it restores) |
configurationIdentity |
exact ids and a binding store for declared environment variables, connection references, Custom APIs and duplicate rules (configurationIdentity: "stable-v1", minimumPluginVersion: "2.23.0"): a duplicate rule is created and then only verified, and a Custom API takes only single-request or create-only edits |
columns[].dateTimeBehavior |
portable schema: calendar-day dates, fixed option values ({ "value", "label" }), table search and duplicate detection (searchEnabled / changeTrackingEnabled / duplicateDetectionEnabled) |
relationships[]
{ "type": "OneToMany", "referenced": "new_customer", "referencing": "new_ticket",
"lookup": { "schemaName": "new_CustomerId", "displayName": "Customer" } }
referenced= the "one" (parent);referencing= the "many" (child, gets the lookup column).lookup.displayNamelabels the lookup column — in the table's column list, in views, and on the form field that carries it. Omit it and the lookup is labelled like the table it points at, as the maker portal does ("Project" for a lookup tonew_project), in this order:- the
displayNameyou set — a plain string, or a language-code map — which always wins; - the referenced table's own
displayNamewhenentities[]declares it. A language-code map stays a map, so the column carries one label per language; - for a parent whose name the spec cannot give — a table it does not declare (
account,contact,systemuser…), or one it declares without adisplayNamethat the build did not create (an"existing": trueincidentis "Case", not "Incident"): the display name the environment reports for it, read when the lookup is created; - a humanized form of the table's name (
contoso_ProjectPhase→ "Project Phase"), only when nothing above applies — an offline surface, a read that failed, or a table the spec declares with nodisplayNameand the build creates.
Offline surfaces (the plan, the previews,
app-spec.md) never ask the environment, so wherever step 3 applies they show step 4; the column itself is labelled by step 3. Where the build may find a declared parent that has nodisplayNamealready there, the plan says so ("Project, or the label from the environment ifnew_projectis already there"). Relationships whose lookup label is a language-code map are created before the others, in the order the plan lists them.- the
A rebuild repairs only the old default. Builds used to label an omitted
lookup.displayNamewith the parent's logical name (new_project), and a form field the SDK could not resolve the column for with the lookup's own logical name (new_projectid). A rebuild relabels such a lookup column — and the form field the build's auto layout labelled with it — to the default above only when the spec omitslookup.displayNameand the deployed label is exactly the old default (case counts, so a correct "Contact" is never mistaken for one): for the column, the parent's lower-case logical name in a single language, which is the one the build writes; for a form field, that name or the lookup's own lower-case logical name. A column labelled with the lookup's own name was labelled by a person, so it is kept. An old default in another language is left alone, with a warning: a write in the build's language would leave two, one of them still the identifier. A label a maker chose in the designer is never touched, and neither is one the spec sets explicitly. A form field that still holds the old default follows the column's current label, whatever that is.The relationship's schema name defaults to
<referenced>_<referencing>and must differ fromlookup.schemaName(Dataverse rejects a collision —lintAppSpecflags this, soscripts/lint-app-spec.jscatches it before you deploy; note the build itself does not run the lint, so an unlinted spec hits the failure at build time instead).Relationships to a standard/system table (e.g.
systemuser,account— a common "bridge to a real user / owner" pattern) are handled automatically: because a system table has no publisher prefix, the naive default name wouldn't start with your prefix and Dataverse would reject it. The builder auto-prepends the publisher prefix (e.g.systemuser+ childcontoso_teammember→contoso_systemuser_teammember), so you don't need to setschemaName. If you do supply an explicitschemaName, it must start with<publisherPrefix>_— the lint errors otherwise (an unprefixed relationship name is a build-time 400).Two relationships may not share a schema name. Dataverse allows one relationship per name, so the second would not be created. A 1:N and an N:N between the same pair, two 1:N relationships on one pair (different lookups), and a self-referential 1:N plus an N:N on that table all derive the same default name — give one of them an explicit
schemaName.
Many-to-many:
{ "type": "ManyToMany", "entity1": "new_project", "entity2": "new_tag" } // intersect auto-named
- A plain N:N (no extra fields on the link) — use
ManyToMany. A form sub-grid can sit on either side (the builder resolves the N:N relationship name automatically). intersectEntityName(optional) names the table that holds the links. Leave it out and the build names it after the relationship (its schema name, lower-cased). A build andverify-model-app.jshold the relationship to the name you give it: an N:N that already uses the schema name on another intersect table is refused by the build and fails verify. With nointersectEntityNamethe relationship is reused whichever intersect table it has.- N:N that needs attributes on the link (e.g. a role/date per assignment) — model a
junction entity with two
OneToManyrelationships into it, and put the payload columns on the junction. Sample rows then bind both parents via$parents(see sampleData). This is the recommended pattern for "Technician ↔ Work Order with a Role".
What a download reconstructs. download-model-app.js rebuilds relationships[] from live
metadata, keeping the lookup's deployed casing (new_CustomerId, not new_customerid) and its
label. The label is left out when it is the default a rebuild would write (the parent
table's display name) or the old default an earlier build left on it (the parent's logical name, which
a rebuild repairs — an explicit label is never repaired, so writing the identifier out would keep it for
good), so a downloaded spec stays minimal; a label that differs is written out as it is. It emits an explicit schemaName whenever the deployed name is not the one this
solution's prefix would generate, including a name that uses another publisher's prefix. Omitting
that name would make a rebuild into the same environment create under a different name and
fail on the lookup that already exists. A foreign-prefix name is a lint warning: a new environment
cannot create it under this publisher, so rename it explicitly there. Three cases it cannot express are reported by name and reason
rather than silently dropped:
- a polymorphic lookup — one column targeting several tables (Dataverse surfaces it as several
relationships sharing one lookup attribute), where
relationships[]declares exactly onereferencedtable per lookup; - a parent that is a custom table the app does not include, which a rebuild target would not
have (a bridge to a standard table like
systemuser/accountis kept — every org has one); - an N:N whose partner table is outside the app.
Every relationship a download reconstructs carries "existing": true — the same ownership flag its
tables carry, for the same reason: a download cannot prove this app created it. The build still creates
a missing one; teardown retains it, because deleting a relationship removes its lookup column (and
that column's data) from a table teardown also retains. An author-built relationship has no flag and is
torn down with the app as before. If you set the flag on a relationship yourself, set it on its
referenced table too: teardown cannot delete a table that a retained relationship still points at.
A polymorphic lookup's shadow attributes (<lookup>name, <lookup>yominame) are excluded from
columns[] along with it, so a rebuild does not gain invented Text columns where the lookup used to
be. Every lookup has shadows; a polymorphic one's are physically stored rather than logical, which is
why they need naming here at all.
views[]
{ "entity": "new_ticket", "name": "Active Tickets", "columns": ["new_subject","new_priority"],
"sort": [{ "attr": "new_subject", "dir": "asc" }], "activeOnly": true,
"description": "Unresolved tickets, most urgent first — the queue agents work from.",
// optional rich filters (beyond the default active-records condition):
"filters": [
{ "attr": "ownerid", "op": "eq-userid" }, // "my" records — no value
{ "attr": "new_priority", "op": "not-in", "values": ["Low"] }, // multi-value (Choice labels resolve to option values)
{ "attr": "new_duedate", "op": "this-week" } // relative-date — no value
] }
columns[]is an array of column NAMES (strings), and so aresort[].attrandfilters[].attr. Not[{ "name": "..." }]— that is the shapeforms[]uses for its fields, and it used to be accepted here and stringified into the view's FetchXML as[object object]. The build then failed at the platform, mid-run, and left behind a view row that could not be read or deleted, so every later build failed the same way. It is now rejected up front, naming the view and the offending entry.- A view takes only these keys:
entity,name,description,columns,sort,filters,activeOnly, and — on a view with"reconcile": "declared"—key,viewId,linkEntities. A filter item takesattr,op,value,valuesandrelatedEntity. Any other key is refused (a validation error, so the lint exits 1 without--strictand the build stops before it writes anything): the build reads only those keys, so a view written withfilterwould otherwise be built without its filter and list every active row. The message names the key it most likely meant (filter→filters,column→attr,operator→op) and the allowed keys. A view has notype(it is always a public view of its table, so leave it out); atypean older doc showed is still accepted without a message. Teardown and preview only read a spec that an earlier release may have built, so they accept one with such a key;verify-model-app.jsreads it too, and reports the finding as a warning. A--changed-onlyapply validates the spec before it decides anything, so an unchanged spec with such a key is refused as well, not reported as nothing to apply. activeOnly(defaulttrue) addsstatecode eq 0.filters[]add conditions:opis any FetchXML operator —eq/ne/lt/le/gt/ge/like, no-value ops (eq-userid,null,not-null,this-week/this-month/today/…), and multi-valuein/not-in(usevalues[]). Choice labels invalue/valuesresolve to option values, as described next. This is what "My Open Orders" (ownerid eq-userid+new_status not-in [Completed, Cancelled]) and "Completed This Week" (new_status eq Completed+modifiedon this-week) need — no post-build FetchXML patching.- A Choice label in a filter is resolved against the environment, not guessed.
value(orvalues[]) ofeq/ne/neq/in/not-in, and ofcontain-values/not-contain-valueson a multi-select, may name an option by its label — in any language the option has — or by its integer value. Only the environment knows the numbers. A filter on a column of a table you reuse (account.industrycode, a local option set — or a column bound to a system global choice) needs no column declared for it: the label is resolved from the environment, where an unresolved label used to reach Dataverse as text and be rejected part-way through the build. A declared global choice that already existed with other values than the spec lists holds the environment's numbers too. (A column bound to a global choice thatglobalChoices[]does not declare is a lint error, and stays one.) So the build reads the column's options from the environment (a table is read at most twice per build — once before anything is written, once in the views phase, see below) and resolves the label there. Only where the environment cannot say — the table is not there yet, or the read failed — does a declared Choice column fall back to the options the spec declares (inline, or a declaredglobalChoices[], numbered from 100000000), and the build then warns, since that numbering is right only for an option set this build created. (A column bound to a declared global choice is first resolved from the global choice itself, which the build reads by name; the spec's numbering is the last resort.) The rules:- an integer — or a comma-separated list of integers, the form a multi-select takes — is an option value and is used as written, with no read;
- a label that matches no option stops the build, naming the view, the column and the valid labels (the
first 25, then a count). It is never sent as a value. Every unresolved label of every view is reported in
the one halt. The one exception is a column whose options your spec numbers —
options[]on the column, or a global choice thatglobalChoices[]declares (100000000 + index): where the environment has no option with that label but has an option on the number your spec gives it — a maker renamed "Gold" to "Gold Tier", or a translation never reached the environment — the build uses that number and warns that it is taking that option to be the one you meant. It never does so where the environment shows the numbering is not yours: an option on that number that goes by the name of another option of yours, or a label of your spec that the environment carries only on other numbers and that shows the numbering moved — the label is one of the labels of the option you filter on (in any language), or it sits on a number your spec gives another option (you inserted or reordered options after the column was built — a rebuild does not change an existing column's options — or another app created the column or the global choice in another order). A label on a number your spec does not use at all is an option a maker added or re-made elsewhere, and does not count against your numbers. Those, and any label with no option on its number, still stop the build, and the message says why your number was not used (The spec numbers "Gold" 100000001, but the environment shows another numbering ("Bronze" is numbered 100000003 there, 100000002 in the spec), so that number is not used.). That check ignores the case of a label; resolving a label still takes its exact text. Where nothing the environment carries contradicts your number — every option renamed, say — the build uses it, as it always did, and the warning is the only trace: use the option's integer value to take the choice out of the build's hands; - a label that names more than one option (the same text on two options, in different languages) stops the build too — use the integer of the one you mean — unless the number your spec gives that label is one of those options (a maker added a second option with the same text): the build then uses that one and warns;
- on a column the spec does not declare that the environment says is not a Choice column (a text filter), the value is used as written; if the environment cannot be read, the value is used as written with a warning, since it cannot be told apart;
- a view that already exists keeps its filters (below), so an unresolvable label on it does not stop
the build —
verify-model-appreports it.
- It stops before the build writes anything, where it can. An apply that writes the solution or the data
model first checks every label the environment can already answer, so a typo is reported while nothing has
been written — not after the tables and columns have been. That covers a column the environment already has
(its options are final: the build leaves an existing column alone), a column the spec declares and the
environment lacks (the build creates it from the spec's options — or, bound to a declared global choice
that already exists, from the environment's copy of it), and the data stage of a staged build. A label that
depends on what the build is about to create — a status reason it inserts, a column of a table it makes —
cannot be known yet, so it is checked again in the views phase, once the data model exists, and no view is
written on a label that fails there. A spec with a localized label (any
displayName, option or lookup label written as a language-code map) is checked only in the views phase: reading option labels ahead of creating a multi-language label can leave Dataverse with only its base-language version, and a typo in a filter is not worth that risk. The check still comes before any view is written; it comes after the tables and columns instead of before them. - The checks around it. The dry run (build without
--apply) asks the same question and reports a view the build would create whose label cannot be resolved as? unknown, with the reason, and counts it in its summary as one that would stop the build rather than one it could not read. It also says, as a warning, what the apply will say: the assumption made for a renamed option, once; and for a view that already exists, which staysreuse, that its filters are left as they are andverify-model-appwill report a label that names no option.verify-model-appexpects the value the environment gives the label, so a view the build resolved live verifies, and a label that resolves to nothing failsview-filterswith the valid labels. A label whose options verify could not read is reported as unresolved, with the reason, rather than as a missing filter — unless the view has no condition on that column at all, which is reported as missing.lint-app-specis offline and can only check what the spec declares: it says nothing for a label the spec's own options prove, and warns that the label is checked against the environment at build time for a label that is not among the declared options and for a column the spec does not declare. - Default-view enrichment (automatic): the auto-generated "Active <Entity>" and
"Inactive <Entity>" system views ship with only the primary column. The build enriches
them with the primary column plus up to 6 meaningful declared columns (in declared order, skipping
wide/opaque types like MultilineText). This runs by default for every table the build owns that
has extra columns; opt a table out with
"enrichDefaultViews": falseon itsentities[]entry. A table marked"existing": trueis skipped by default — enrichment replaces a view's column set, andexistingmeans the build cannot prove it owns the table, so rewriting another app's default views is not a safe default. Set"enrichDefaultViews": trueto override that when you know the reused table is yours. Author-declaredviews[]are separate and always win. - A view is found by its name on its table, so a name the table already has is that view. A view
named like the platform's own "Active <Plural>", or like any view already on the table, is not
created a second time: the build adds the spec's columns to the existing view (removing none) and
writes its
description, but does not reapply itsfiltersorsort— it warns instead. Give the view its own name to get a separate one.
charts[]
{ "entity": "new_ticket", "name": "Tickets by Priority", "chartType": "Pie",
"groupBy": "new_priority", "measure": "count",
"description": "Where the open workload is concentrated." }
chartType:Column · Bar · Pie · Line.groupByMUST be a Choice column onentity.--verifychecks the deployed chart, not only its name: its type, its table, its group-by column and its measure must match the spec, and it must have no filter, join or second series. An explicitdescription, and thetitleof a declared chart, must match too. A mismatch fails. A rebuild does not change an existing chart unless it hasreconcile: "declared", so declare it or recreate it. Parts of a chart that verify cannot read are reported as unverified. Styling is not checked.
forms[]
// auto layout (default): primary + all scalar columns + 1:N parent lookups; opt-in child grids
{ "entity": "new_customer", "type": "main", "name": "Customer", "layout": "auto",
"description": "The main customer record — profile, contacts and open tickets.",
"notes": true, // optional — add a Notes section
"autoSubgrids": true, // optional — a sub-grid for every child relationship
"deactivateOtherMainForms": true, // optional — see below (own custom tables only)
"subgrids": [ { "childEntity": "new_ticket", "view": "Active Tickets", "label": "Tickets" } ] } // + optional tab / column / after / before — see "Where a sub-grid goes"
// explicit layout: author tabs -> sections -> columns(1-4) -> fields
{ "entity": "new_project", "type": "main", "name": "Project",
"tabs": [ { "label": "General", "sections": [
{ "label": "Details", "columns": 2, "fields": ["new_name","new_budget","new_status"] } ] } ] }
// explicit layout, richer: multi-column tabs, per-cell spans, visibility
{ "entity": "new_project", "type": "main", "name": "Project",
"tabs": [
{ "name": "tab_delivery", "label": "Delivery", "expanded": true, "columns": [
{ "width": "65%", "sections": [
{ "name": "sec_scope", "label": "Scope", "columns": 2, "fields": [
{ "name": "new_summary", "colspan": 2 }, // span the whole 2-column section
"new_startdate", "new_targetdate" ] } ] },
{ "width": "35%", "sections": [
{ "name": "sec_status", "label": "Status", "columns": 1, "fields": ["new_status","new_owner"] } ] } ] },
{ "name": "tab_audit", "label": "Audit", "expanded": false,
"sections": [ { "name": "sec_audit", "label": "Audit", "columns": 2, "fields": ["createdon","modifiedon"] } ] } ] }
// per-field control options: read-only, hidden, and targeted positioning
{ "entity": "new_workitem", "name": "Work Item", "layout": "auto",
"fieldOptions": {
"new_workitemnumber": { "readOnly": true }, // visible but locked (e.g. an AutoNumber)
"new_storypoints": { "hidden": true }, // on the form for scripts, not shown
"new_daysremaining": { "after": "new_duedate" } // move it directly after Due Date
} }
// offer this form only to particular personas (a form with no assignment is offered to EVERY role)
{ "entity": "new_ticket", "name": "Dispatcher Ticket", "layout": "auto",
"securityRoles": { "personas": ["Dispatcher"], "fallbackForm": false, "order": 1 } }
// the same options inline, when an explicit layout already lists the fields
{ "entity": "new_workitem", "name": "Work Item", "layout": "explicit", "prune": false,
"tabs": [ { "label": "General", "sections": [ { "columns": 1, "fields": [
"new_name",
{ "name": "new_workitemnumber", "readOnly": true },
{ "name": "new_storypoints", "hidden": true } ] } ] } ] }
// form JS: wire onload/onsave/onchange handlers to a web-resource library
{ "entity": "new_ticket", "type": "main", "name": "Ticket", "layout": "auto",
"events": [
{ "event": "onload", "library": "new_ticket.js", "function": "Ticket.onLoad" },
{ "event": "onchange", "attribute": "new_priority", "library": "new_ticket.js", "function": "Ticket.onPriority" }
] }
// quick-create form: a simplified create form (same entity). formType defaults to "Main".
{ "entity": "new_ticket", "name": "Ticket Quick Create", "formType": "QuickCreate", "layout": "auto" }
// quick-view placement: embed a related record's QuickView form on a host form via a lookup column
{ "entity": "new_ticket", "name": "Ticket", "formType": "Main", "layout": "auto",
"quickViews": [ { "lookup": "new_customerid", "targetEntity": "new_customer",
"form": "Customer Card", "label": "Customer" } ] }
{ "entity": "new_customer", "name": "Customer Card", "formType": "QuickView", "layout": "auto" }
formTypeisMain(default),QuickCreate, orQuickView. AQuickCreateform is a simplified create form on the same entity (no sub-grids, no Notes; events allowed). AQuickViewform is read-only (no sub-grids, no events). Sub-grids/Notes are Main-form only. Every section on aQuickCreateorQuickViewform is one column: the platform refuses a wider one, so an authoredcolumnsabove 1 is built as 1, and the auto layout stays one column however many fields it holds.notes(optional, boolean, Main forms only) — orhasNotes: trueon the table — adds the Notes section:section_notes, labelled "Notes", at the end of the first tab's first form-column, holding the form's Timeline control. The timeline is written in the shape Dynamics renders: the fixed control idnotescontrolin a 23-row cell (auto="false") over the 22 empty rows it spans. A timeline under a generated id in a one-row cell is published but never shown, which is how earlier versions wrote it, so a rebuild repairs such a section in place — the same section, position and cell — on anautoor an explicit layout, and adds the section to anautoform that has none. The height is yours to change: a timeline cell of N rows followed by the N−1 rows it spans is the shape every platform form uses (N is 5 on one form and 20 on another; a new host is written at 23), so a Notes section you resized in the maker is already in shape and a rebuild writes nothing — likewise one you widened with the timeline, or one withoutauto="false", which only some platform timelines carry. A rebuild only adds rows the span is missing, to the span you chose, and never deletes the rows a resize left. It never edits a timeline you added yourself and never writes a secondnotescontrol: where the form already has a control with that id, no Notes section is added; an old section whose id cannot be renamed for the same reason is left as it is; and so is one that still holds a control of yours after the build has pruned the fields your layout dropped and moved the ones your layout declares in another section or afieldOptions[].afterplaces elsewhere (move them out of it, or delete the section, in the maker, then run a full build). Those fields never stand in the way: the repair is the last step, so a stray field the same build removes is gone by then. Each refusal is reported in the build result (skipped.layout).--verifyfails the form (form-timeline) until it carries a timeline that renders — undernotescontrol, in a cell spanning more than one row, and for the Notes section the build owns, with the rows its span needs under it — and says what to do about it: run a full build where the build repairs or adds the timeline, what to change in the maker first where it will not. Verify reads the form as published, before the build's own passes have run, so for the fields in an old Notes section it predicts what the build will take out: the fields your layout declares in another section, the ones afieldOptions[].afterplaces beside an anchor in an ordinary section (an anchor that sits in the Notes section but is itself anchored is moved out first, and the field follows it), and — on an explicit layout withpruneon — the ones it does not list. For those it says to run a full build and names what the build takes out first (a removal needs--allow-destructive), and it asks you to move out of the section only a control no rule of your spec moves or removes — a field no rule moves (on anautolayout, any field already on the form that nofieldOptions[].afterplaces), or a control of your own. A field the form carries more than once is not predicted when a rule would act on it, and neither is one anchored — directly or down a chain of anchors — to a field the form carries more than once with a cell in the Notes section or a sub-grid's: a build acts on one cell of a field, and which one depends on how it arranges the sections. For the cell in the Notes section verify says it cannot tell whether the build takes it out — a full build repairs the timeline unless it leaves that cell — and what to do if the build's report says the timeline was left as it is: it neither promises the repair nor sends you to the maker for what the build may do itself, and it says so while another control holdsnotescontroltoo. A repeated field that no rule moves is predicted: it stays, and is named. Nor can it see what only happens while the build runs — a removal that was not authorized, a move skipped because the rows it would split carry a row-span — so when the build's own report says the timeline was left as it is, follow the report. Use a full build (without--changed-only) to pick up an older Notes section:--changed-onlyskips a spec that has not changed, and this fix needs no change to the spec. A download does not reconstructforms[], sonotesis authored, not read back.quickViews[](on a host form) embed aQuickViewform via a lookup:lookupis the lookup column on the host,targetEntitythe related entity,formthe name of aQuickViewform declared informs[](lint-enforced). Optionallabel,section,displayAsCard. The control renders from plain formxml, so it persists on a plain push. It is added to the host's first field section — never a sub-grid's section or the Notes section, which hold nothing else.A sub-grid needs a matching
OneToManyorManyToManybetween the form's entity andchildEntity(lint-enforced); the builder resolves the relationship name either way. Each sub-grid renders in its own 1-column, full-width section; its title defaults to the child entity'spluralName(thendisplayName), withsubgrids[].labeloverriding.Where a sub-grid goes (Main forms only). With no placement keys a grid's section is added at the end of the first tab's first form-column and never moved — as before. Four optional keys on a
subgrids[]entry say where it goes instead:Key What it names Effect aftera section this form's layout declares the grid's section goes directly after it, in that section's tab and form-column — nothing between them (not the Notes section a build appends to the end of the first tab) beforethe same directly before it. Give one of after/before, not bothtaba tab this form's layout declares the grid goes in that tab — at the end of it when the build adds or moves the grid. With after/beforeit must be the tab the section is incolumna form-column of the tab, counting from 0the grid goes in that form-column of the tab (the first tab when tabis not given). Withafter/beforeit must be the section's form-columnNames are the ones the layout declares —
tabs[].nameandsections[].name, compared case-insensitively; the name a tab or section gets when it declares none counts too. Anautolayout has one tab,tab_general, holding one section,section_general, so it can place a grid before or after that section. Grids that share an anchor stay in the order they are declared. An unknown name,afterwithbefore, acolumnthe tab does not have, or a section in another tab or form-column than the one named is an error in bothvalidateAppSpecand the lint — each says what the form declares instead. Placement on a form that is not a Main form is refused with the sub-grid itself. A key a sub-grid entry does not read (afterSection,Tab) is ignored with a warning naming the key it probably meant. A form holds one grid per relationship, so list each child table once: a table listed twice with a placement key on either entry is an error (only one entry could say where the grid goes), and listed twice with no placement it is a warning — the build adds one grid and ignores the rest, as it always has.// a full-width related-records grid between two sections: Summary, then Tasks, then Resolution { "entity": "new_ticket", "name": "Ticket", "tabs": [ { "name": "tab_main", "label": "General", "sections": [ { "name": "sec_summary", "label": "Summary", "columns": 2, "fields": ["new_name", "new_priority"] }, { "name": "sec_resolution", "label": "Resolution", "columns": 2, "fields": ["new_resolution", "new_closedon"] } ] } ], "subgrids": [ { "childEntity": "new_task", "after": "sec_summary" } ] } // a grid in its own tab, and one in the second form-column of a two-column tab { "entity": "new_ticket", "name": "Ticket", "tabs": [ { "name": "tab_main", "label": "General", "columns": [ { "width": "60%", "sections": [ { "name": "sec_left", "label": "Left", "columns": 1, "fields": ["new_name"] } ] }, { "width": "40%", "sections": [ { "name": "sec_right", "label": "Right", "columns": 1, "fields": ["new_priority"] } ] } ] }, { "name": "tab_related", "label": "Related", "sections": [ { "name": "sec_history", "label": "History", "columns": 1, "fields": ["new_notes"] } ] } ], "subgrids": [ { "childEntity": "new_task", "tab": "tab_related" }, { "childEntity": "new_comment", "tab": "tab_main", "column": 1 } ] }Width. A grid's section is one form-column wide and fills the form-column it is in. In a tab with several form-columns it is therefore as wide as its own column; to give a grid the full width of the form, put it in a tab of one form-column (a tab with
sections[]and nocolumns[]is one).columnhas no other effect — the layout stays yours to shape.Rebuilding converges. A rebuild puts the build's own grid section where the spec places it, and a rebuilt form ends in the order a new one gets. A grid an earlier version appended to the end of the form — behind the Notes section — moves, the same section with its control and anything you set on it, to sit directly after (or before) its section; one already directly beside it writes nothing. Only the grid moves. None of your sections, and not the Notes section, is moved to make room, so a section you added between the grid and its section simply ends up behind the grid. With only
tab(andcolumn) a grid already in that tab (and form-column) stays where it is within it. A grid in a section you made yourself is never moved — the build reports it inskipped.layout(unless it is already where the spec places it, which needs neither a move nor a report), as it does a name the deployed form no longer has (a grid not yet on the form is then added at the end of the first tab, not lost; one already there stays where it is).--verifychecks each placed grid (form-subgrid): it must be on the form, in the tab and form-column the spec names, and directly beside the section it is placed by (or beside the grid placed there ahead of it) — what sits between them is named. A grid an earlier version left elsewhere needs a full build to be moved —--changed-onlyskips a spec that has not changed — and the failing check says so. A download does not reconstructforms[], so placement is authored, not read back.deactivateOtherMainForms(optional, defaultfalse, Main forms only): after promoting this form as the entity default, deactivate every OTHER active main form on the entity — i.e. hide the blank stock "Information" form so only this form ships active. Destructive, so it is OFF by default and only ever applies to a table THIS build owns (a custom, publisher-prefixed, non-existingtable); it never touches a reused/system table. Teardown reactivates the stock form before deleting ours, so a torn-down table is left clean.isDefault(optional, boolean, Main forms only) — which Main form the table opens with: the build marks itsystemform.isdefaultand puts it first in the table's Main Form Set order — the flag alone does not decide what opens (see Which form a table opens with below). Exactly one Main form per table may set it. Set explicitly, it applies on any table,existing: trueincluded; without it, a table this spec creates opens with its first Main form in spec order. It is applied once, after every form exists, rather than each form racing to promote itself. A promotion the environment refuses is reported as a warning and fails--verify, which proves the deployedsystemform.isdefaultindependently — so a build can no longer record a default it did not actually set. Moving the default to another form clears it on the table's other spec-declared Main forms (measured: setting the flag on one form does not clear it on another, so both stayed default), and--verifyfails while any of them still holds it. Forms the spec does not declare, and their activation state, are never touched.Form resolution is by
(entity, name, formType)— a Dataverse form name is unique only per(entity, type), so a table's auto-created Main, Quick View, and Card forms can all be named "Information" without colliding. AformType:"Main"edit reconciles only the Main form; same-named Quick View / Card siblings never block it.formId(optional, GUID) — pin an exact existing form to reconcile. Needed only for the rare residual collision where a table has two forms of the same(entity, type, name)that type-scoped resolution can't disambiguate — the build then errors and tells you to setformId. The id is verified to belong to the form's table before anything is reconciled. Omit it for normal forms.reconcile(optional; needsminimumPluginVersion: "2.21.0") —"declared"makes the rebuild place the spec's fields, spans, sections and field options as declared (an explicitfalseclears a flag) and add a missing sub-grid, quick view or handler, while a control the spec does not declare keeps its place. Without it a rebuild only adds fields. Seeforms[].reconcileinapp-spec-schema-advanced.mdfor what is refused, the approvals and publishing.events[]wire client-side JS:eventisonload/onsave/onchange(onchangeneeds anattribute),libraryreferences a declaredwebResources[]name (lint-enforced),functionis the JS function. Optionalenabled(default true),passExecutionContext(default true),parameters(a comma-separated argument list). All three are honoured — an authored"enabled": falsereally does deploy a disabled handler.enabledandpassExecutionContextmust be booleans andparametersa string; a string"false"is rejected rather than coerced, because it is truthy in JS and would silently enable a handler you meant to disable. The build fetches the pushed form and injects the handlers; they go live when the form is published (with--publish, in the one publish of the tables the build changed, made before it publishes the app; without it, as soon as they are wired).
Which form a table opens with — isDefault and entities[].mainFormOrder
A table's Main forms are served in its Main Form Set order, and a user opens the first one
they may open — unless they switched forms earlier: the platform remembers the last Main form each
user opened for a table and opens that one for them while they may still open it. The order is
stored on each form (its formxml <DisplayConditions Order="n">), and systemform.isdefault does
not change it: measured, moving the flag reordered nothing, and a table's three new Main forms, all at
the same order, were served with the isdefault form last.
forms[].isDefault: true— this form opens first: it becomes the table's default and comes first in the order. Applied on any table.entities[].mainFormOrder— the order itself, first to last, as names of the table's Main forms informs[]:
The first form is the one the table opens with (an{ "schemaName": "contoso_workitem", "existing": true, "mainFormOrder": ["Work Item", "Work Item — Summary", "My Work — Work Item"] }isDefaultform must be first). A partial list puts the listed forms first; the table's other spec forms follow in their current order. Each name is spelled as informs[], and must not match another Main form of the table ignoring case and accents — Dataverse, and so the build, compares form names that way, and could not tell them apart.- Neither set: on a table this spec creates, the first Main form in spec order comes first and the others follow in spec order. On any other table the order is left as it is, and a Main form the build creates there is put after the table's other Main forms — adding an alternate form does not change what the table opens with. If none of those forms has an order yet, the new form comes first and the build warns; it also warns when the new form comes before a form that has no order (a form without one is served after every form that has one). The new form's place is part of creating it, so an interrupted build cannot leave it first.
- Only forms in
forms[]are written. A Main form the spec does not declare keeps its order; if it would still come first, the build warns and--verifyfails, naming it. Move it down in Maker (Form settings → Form order), or declare it and list it inmainFormOrder. securityRoles.orderwrites the same attribute. A table where a Main form sets it is ordered by hand: the build leaves its order alone, and the spec cannot also give itmainFormOrder.- Also deciding what a user sees: their security roles — a form restricted by
securityRolesis served only to those roles, and everyone else opens the next form they may open — and their remembered form, which is per user and table, not configuration (they change it by switching forms). Withoutapp.mainForms, an app offers every active Main form of its navigation tables, including undeclared forms such as stock "Information". Useapp.mainFormsto restrict additions for this app; creating an app is exact, but existing members are never removed automatically. --verifychecks the stored order (form-order) and the order the platform serves the user running verify (form-order-served, read with the publicRetrieveFilteredFormsfunction). When that user may not open the first form, the check is reported as not applicable, not as a pass.
Explicit layout — tabs, form-columns, sections
| Level | Key | Meaning |
|---|---|---|
| tab | name |
Stable identity. Emitted as tab_<i> when omitted — see editing an existing form below. |
| tab | label |
Tab title. |
| tab | expanded |
false collapses the tab on open (default true). |
| tab | visible |
false hides the tab (default true). |
| tab | sections[] |
Shorthand for one full-width form-column. |
| tab | columns[] |
The multi-column form: each entry is { "width": "60%", "sections": [...] }. |
| form-column | width |
Percentage string ("60%"). Omitted widths split evenly (3 columns → 34/33/33). |
| section | name |
Stable identity, section_<tab>_<i> when omitted. |
| section | label, showLabel, visible |
Section heading, whether it renders, whether the section shows. |
| section | columns |
1–4 grid columns. |
| section | fields[] |
Column logical names, or { "name": …, … } entries. |
| field entry | colspan, rowspan |
Whole numbers ≥ 1. A cell wider than its section is clamped to it — the clamp reaches the deployed cell, not just the row packing. A field moved into another section without a declared colspan keeps its deployed width if it fits there, and is narrowed to that section's width (and reported) if not — declare colspan to choose. rowspan is valid only on the last field of a section (see below). |
A tab declares either sections or columns, never both. columns on a tab is the list
of form-columns; columns on a section is its 1–4 grid width — a number on a tab is rejected
rather than silently discarded. Any other key is rejected — including showLabel/labelPosition
on a tab and labelPosition/locked on a section, which FormXml has no place for, so accepting them
would promise a layout Dataverse never renders. The SDK refuses these too, but this plugin rejects
them at author time — before any workspace or network call — and names the real mechanism rather
than reporting a JSON pointer into the compiled form.
minimumPluginVersion (top level, optional) declares the oldest plugin that can build this spec —
"minimumPluginVersion": "2.9.0". A plugin older than that refuses the spec instead of mis-compiling
it, naming both versions. The value must be a plain dotted version (2, 2.9, 2.9.0) with an
optional -pre or +build suffix, which compares on the release core. Anything else — 2..9, a
trailing typo, stray whitespace — is rejected as malformed rather than quietly reinterpreted as a
different floor.
⚠ It protects forward only. Measured against the shipped 2.8.0 validator, an unknown top-level
key, schemaVersion: 3 and even schemaVersion: 99 are all accepted — it validates none of them —
so no marker can make an already-released consumer reject a spec. What stops an older plugin
damaging a richer form today is the destructive preflight: reducing a multi-column form to an empty
field set surfaces as a plan to remove every non-primary field, which needs authorization.
Names are identity, and a field is placed once per form. Two tabs — or two sections — on one
form may not share a name, and a column may not be placed twice, whether in two different sections
or twice in the same one (matching is case-insensitive, and applies to both the string and the
{ "name": … } entry shape). All three are rejected at author time.
The reason is that create and rebuild would otherwise disagree. The compiler emits one cell per
entry, so a fresh build deploys a duplicated field twice, while every reconcile path resolves a
field to its first placement — the second cell would appear on the initial create and then vanish
on the next build of the same spec. Duplicate container names fail the same way: name is what the
build matches a deployed tab or section by, so two declarations sharing one would target the same
live container. A second form on the same table may of course place the same column — identity is
per form.
rowspan must be the last field in its section. A cell that spans down reserves its column in
the rows beneath it, and the cells of the following row fill the section left to right — so a field
declared after a spanning one would land in the reserved slot. Every stock Dataverse form that uses
rowspan puts it on the last cell of its section, so that is the shape this plugin emits.
This is a compiler limitation, not a platform one. Positioning a field beside a vertical span requires emitting an empty spacer cell to occupy the reserved slot, which the SDK serializes correctly; the compiler does not emit one yet. The restriction can be lifted once it does.
A deployed rowspan — one a maker added by hand, which the authored restriction above cannot
prevent — can make the rows of a section positionally meaningful in the same way: once any cell
follows a row-spanning cell, re-flowing the section by reading order could move that cell into
the reserved slot. In such a section the build therefore never flattens and re-flows the whole
section. Every fit below counts a row's own cells plus the columns a row-spanning cell above
still reserves in it — the same occupancy rule --verify applies, so placement does not introduce
row overflow. Narrowing the grid is applied
only when every row already fits the new width that way; otherwise the section keeps its current
grid and the refusal is reported. A span change that would overflow the rows its cell occupies is
skipped (and reported), rather than applied without the re-flow. Before optional positioning, a new
field is packed into the last row if it fits there, otherwise into the first new row with room.
Likewise a rowspan is never raised on a deployed cell that other cells follow, even when its
row still fits: the build keeps a field where
the form already has it, so the field you list last is not necessarily last on the form. A section
whose row spans are all trailing — stock Main forms put rowspan on the last cell — re-flows
normally, because nothing comes after the span to land in its reservation. Every refusal is also
recorded in the build result (skipped.layout). --verify reports declared grid/span/state
mismatches for an explicit layout, but does not check field order or after adjacency.
Editing an existing form. An explicit layout reconciles containers and field-to-section
placement, not the order of existing fields. It is not flattened into the form's first section:
missing tabs, form-columns and sections are created where the layout places them, a tab's
label/expanded/visible, a form-column's width and a section's
columns/label/showLabel/visible are updated in place, a named section that sits in another
tab or form-column is moved to where the layout places it, the tabs — and the sections of each
form-column — are put in the layout's order, and a field sitting in the wrong section is moved
(never duplicated — the cell keeps its id and any control state a maker edited). Containers are
matched by name, then label, then position, so a form built by an earlier auto layout — or by
hand in Maker — reuses its containers instead of gaining a duplicate tab. Nothing is renamed,
because form scripts and business rules can reference a section by name. Tab/section moves are
reported; only the layout's own
containers are ordered — a tab or section it does not mention (a maker's own, the notes timeline)
keeps its place among them.
Three rules keep that matching from claiming the wrong container. An index an earlier tab or section
already matched is not reused, because an unlabeled container compiles to a default label
(General for a tab, Details for a section) and several of them would otherwise all match the
first one. A tab or section whose name another one in the layout declares is matched only by that
name, so it can be moved to its own place instead of being taken over by a neighbour with the same
label or position. And sections the engine owns — a sub-grid host, the notes/timeline section — are
matched only by name: a label or a position is not evidence about what a container is, and
matching one positionally would relabel a sub-grid and place fields in the row holding its grid.
Their name is the engine's own, so a section you declare never takes one even by name: a section
of yours called section_notes gets a section of its own rather than the timeline host of that name.
A host is known by that name and by what it holds: only controls without a field, or the control the
host exists for — the timeline in section_notes, a sub-grid in section_grid_… — even after a maker
added a field beside it. A section of yours that a maker filled with a web resource or sub-grid keeps
its own name, and is still found by it. (One you name section_notes or section_grid_… is
indistinguishable from a host when it has no fields, or when a maker puts that host's control into it:
the build then gives your fields a section of their own beside it. Give it another name. And a host
that a maker both renamed and gave a field carries neither mark, so it is matched like any other
section — keep the engine's section names when you customise its sections in Maker.)
⚠ Moving a section. A section with an explicit name is found wherever it is on the deployed
form and moved to the tab and form-column the layout places it in — the same section, so its fields,
id and anything set on it in Maker travel with it, and the build reports the move. It lands after
every section the layout places before it in that column (or first, when there is none). A section
whose name is generated is a different identity once it moves — generated names encode
position (section_<tab>_<column>_<index>) — so it is created in the new place, its fields are moved
into it, and the original, left empty by this run, is removed (unless "prune": false). Give a
section an explicit name when you intend to move it. A section the layout stops mentioning is
removed only when this run empties it — its fields pruned, or moved into another section — and
prune is on; anything else it still holds keeps it, and a section it leaves alone is yours to
remove in Maker.
⚠ Field order. On a new form, an explicit section's fields list sets its initial reading order.
On an existing form, a field already in its requested section stays where it is: changing the
list does not reorder existing fields. A field in another section is still moved to its declared
section, without reordering the fields already there.
Only a field created by this build takes its listed position: after its listed predecessor, or before its listed successor when it starts the list. A leading run of new fields is placed before the next existing listed field, then chained in list order. Placement uses the occupancy-safe mechanism below. If reservations make insertion unsafe, the new field keeps its safely appended position and a warning is recorded; later builds treat it as existing rather than retrying list reordering. This does not promise the whole list's order when existing neighbours are out of order.
Missing fields and relative positions are planned together on a copy, then persisted in one artifact edit. A failed write cannot leave an appended-but-unpositioned new field, an overflowing intermediate row, or duplicated trailing cells. A retry uses either the prior layout or the complete planned layout, preserving existing cell/control identities.
--verify checks tab/section order, the tab and section labels a layout authors, row occupancy and
cell/control ID uniqueness across each whole form, including headers, footers and unbound controls.
A label is compared in the language the build wrote it — a string label in the build's authoring language (the
--language-code the build was given, which verify-model-app.js takes too; else the spec's languageCode; else the
organization's base language), a label map at each language it declares, with no
word about a translation it leaves out — so a relabel that never reached the published form fails even when
ANOTHER language carries the wanted text, and a caption the published form lacks in a language it carries is a mismatch, never a pass.
Where the build's language cannot be established (the organization cannot be read, and nothing else says it), a string label is
reported unverified — neither passed nor failed — with the reason, and every other check still runs.
The same goes for a language the environment's form read does not carry: the platform decides which languages' labels go
into the FormXML it returns, and it can return fewer than the form stores (measured: a form built and published with Spanish
(3082) captions in an English-language (1033) organization keeps both languages, yet its published FormXML carries every label in
1033 alone). When no label of the form — on any element — is in the language a label is compared in, while the read carries labels
in other languages, the labels compared in it are read from one translation export of the app's solution — the one read that
carries every provisioned language — by the id the tab or section has in the FormXML: the caption the spec declares passes, another
text or an empty cell is a mismatch and fails, and a label map { "1033": …, "3082": … } is compared language by language. What the
export cannot settle (it fails or cannot be read, the form gives the element no id, the export has no row for it or no column for the
language) is reported unverified with the reason (what to do: check those captions in Power Apps with that language), and ok
and the exit status are those of everything that could be compared. Cost: one request per verify, made only when there is such
a caption to check — measured at 7.5–11.2 s for a solution of one table, more as the solution grows (it exports every label of it) —
and it shows the published layer: a caption saved and not published is not in it. A language the read does carry is compared
strictly, from the read: a stale caption in it fails. A form whose read carries no label at all names no language that could be
missing from the read: the captions the spec declares for it are missing, and fail.
A label the spec does not write is not compared. Auto forms also require readable
FormXML for the identity check. Repeated bindings of one field with distinct IDs are allowed.
It does not check field order or after adjacency.
To reposition an existing field, use fieldOptions[x].after outside the explicit field list, below.
⚠ Declaring explicit tabs also switches pruning on: a field the deployed form carries and the
layout does not list is removed (never the primary field). Set "prune": false to restyle or
reorder a subset without re-declaring every other field. A row that a removed or moved field leaves
holding nothing goes with it, so no blank line is left behind. The exceptions are a row that a
row-spanning cell above still reserves, which stays because the span occupies it, and a row that was
already empty, which is left as it is.
Per-field control options — readOnly, hidden, after
A form field can carry these per-control options. Declare them form-level in fieldOptions
(keyed by column logical name) — the only route under an auto layout, which has no field list —
or inline on an explicit layout's fields[] entry as { "name": …, "readOnly": …, "hidden": … }.
Where both apply to one field the inline entry wins; a plain string entry keeps working unchanged.
An entry takes only the options below — readOnly, hidden, after, colspan and rowspan — and
an inline entry its name as well; a fieldOptions entry takes no name, because its key names the
field. Any other key (a misspelling such as readOnlyy or colSpan) is rejected at author time —
by the lint, a dry run and a build — naming the key it most likely meant, rather than accepted and
silently ignored. A spec an earlier release built with such a fieldOptions key can still be read:
verify-model-app.js reports the key as a warning, and teardown and preview-form.js accept it. The
option stays unapplied until the key is fixed.
readOnly: truelocks the control (disabled="true"), leaving it visible. Use it for a value the platform generates but does not make immutable — an AutoNumber column is writable through the API, so "read-only" for it is a form-level statement, not a metadata one.hidden: trueplaces the field as a hidden control (visible="false") — present for form scripts and business rules, not shown to the user.after: "<logical>"moves the field so it immediately follows the named anchor in section-flat, row-major cell order, including across a row boundary. This is the non-destructive way to reposition one control: it works on an already-deployed form and does not require re-declaring the rest of the form. Valid, already adjacent fields are not moved again. An overfull row stored by an earlier build can be repacked once without changing that flat order. An anchor that is not on the form is ignored. New listed fields are positioned first; anchors then run in dependency order, so an anchor is positioned before its dependents regardless offieldOptionsproperty order. Every remaining adjacency is checked once afterward, and an unsatisfied request is reported rather than silently accepted. Unlisted anchored controls may therefore sit between listed fields; theafterchain takes precedence over a new field's initial adjacency to its listed predecessor. Placement counts colspans and columns reserved by rowspans above. A full anchor row may have its trailing cells split into new rows immediately below it:[count|name] [code]becomes[count|code] [name]in a two-column section. If the inserted field cannot fit beside the anchor, it takes the next new row instead. Cells keep their identities and control state. A moved cell wider than its destination section is narrowed to that grid and the narrowing is reported. If a split would disturb a row-spanning reservation, or the resulting rows would overflow, the move is skipped, with a warning naming the field, anchor and reason inskipped.layout; these constraint-based skips do not fail the build. SDK/storage errors still halt the build, but the placement edit is atomic and can be retried safely.--verifychecks occupancy and unique identities, not adjacency. Valid only in form-levelfieldOptions, and only for a field an explicit layout does not list. Inlineafter, or a form-level anchor on a listed field, is rejected to avoid combining two placement instructions; that restriction does not imply existing-field list reordering. Use"prune": falseto keep an unlisted field on an explicit form. Two anchor shapes are rejected, because neither has a satisfiable answer: only one field may sit immediately after a given anchor (to place several in sequence, chain them — anchor the second after the first), and anchors may not form a cycle.colspan: <n>widens the control tonof its section's columns (a whole number ≥ 1, clamped to the section's width) — the same key an inline entry takes. Anautolayout generates a one-column section (two columns once it holds more than six fields), so there a wider span only takes effect up to that width — or on a deployed form whose section is wider (a stock Main form the build reconciles).rowspanabove 1 is accepted inline only, on the last field of a section: a form-level option cannot see where its field lands, so it is rejected there.
Only the enabled state is ever written. The build emits readOnly/hidden when you ask for
them and writes nothing when you do not, so a rebuild never clears a lock or a hide someone applied
in the form designer. The corollary is that readOnly: false / hidden: false cannot turn a flag
back off — they are rejected at author time rather than accepted and ignored. To un-set one, clear it
in the designer, or drop the field and let the next build re-add it.
A flag goes on every cell the deployed form holds of the field. A layout lists a field once per form
(a second cell is rejected), but a maker can place one in two sections in the designer, or in the form's
header or footer or a tab's own header or footer (Main forms); the build flags each of those cells — the
rest of the cell, its attributes and its control, is kept as it is — and --verify checks each, naming the
section, the header or the footer of one that is not flagged.
Under an auto layout the flags apply to the fields the layout places — the primary column, the
table's declared columns and its parent lookups. A readOnly/hidden on any other field (a stock
column of an existing table, say) is never written, and lint warns about it; list that field in an
explicit layout instead (prune: false keeps the rest of the form). --verify proves every flag the
build writes, and fails a flagged field the deployed form no longer carries.
prune(optional, defaulttrue, explicit layouts only) — an explicittabslayout is normally the complete desired state, so a rebuild removes any deployed field it does not list. Setprune: falseto keep those fields, which lets you restyle or reorder a subset of a form without re-declaring every other field just to preserve it. It has no effect on anautolayout (already additive) and is warned about there.
securityRoles — who the form is offered to
A form with no securityRoles block is offered to every security role. Declaring one is
therefore a restriction, not a grant, and that direction is what makes each mistake here
access-relevant: an empty list or a mistyped persona would hide the form from everyone, not simply
fail to add anyone. Every malformed shape is a hard error for that reason.
{ "securityRoles": { "personas": ["Dispatcher", "Supervisor"] } } // only these roles see it
{ "securityRoles": { "everyone": true } } // explicitly every role
{ "securityRoles": { "personas": ["Dispatcher"], "fallbackForm": true, "order": 2 } }
personas[]— names from this spec'spersonas[], not role GUIDs. The build resolves each to the role it created. A name that is not declared is rejected at the spec gate, and would halt the build if it somehow reached it.everyone— mutually exclusive withpersonas. That is the platform's model, not a rule of this spec:<Everyone />replaces the role list rather than adding to it.everyone: falseis rejected, because it looks like "restrict to nobody" and means nothing.- Removing a restriction needs
everyone: true, not deleting the block. A build only visits forms that declaresecurityRoles, so deleting the block leaves the deployed<DisplayConditions>exactly as it was — the form stays hidden from everyone outside the old list. This direction fails closed (access never silently widens), but it does mean "undo" is an explicit{ "everyone": true }. fallbackForm(optional) — show this form to users whose roles have no form of their own.order(optional, non-negative integer) — this form's place in the table's Main Form Set (the same attributeisDefaultandentities[].mainFormOrderset; see Which form a table opens with). A table where a form sets it is ordered by hand, and cannot also havemainFormOrder.- Both
fallbackFormandorderare preserved when omitted, so a later build that sets onlypersonasdoes not reset them.
Two things worth knowing. The roles are stored inside formxml, as a <DisplayConditions>
element — systemform has no role relationship at all (it reports
CanBeInManyToMany: { Value: false, CanBeChanged: false }), which is why no association-style API
ever worked and why this needs a dedicated call. And the write lands on the unpublished layer:
live-measured, the published form still reported <Everyone /> until the customization was
published, so the restriction takes effect only after a publish. The build publishes the entity when
publishing is enabled.
Assignment happens in the security phase, not the forms phase, because the roles do not exist
until then. If you build with --phases excluding forms, the assignment is skipped with a message
rather than applied to a form this run did not build.
Column types that cannot go on a form
Big Integer (BigInt) has no Unified Interface form control. A BigInt placed on a form renders
the text "Error loading control" on every record. The auto layout therefore skips BigInt
columns — the column is still created and still readable/writable through the API, it just is not
placed. An explicit layout still honours a BigInt you list by name (you may be pairing it with a
custom control), but the spec validator emits a warning.
pages[] (optional — generative pages / genux) [schemaVersion 2]
[ { "key": "overview", "name": "Overview", "purpose": "KPI overview + recent orders",
"dataSources": ["new_order", "new_customer"],
"source": { "kind": "intent" }, // design-time; generate-pages fills the .tsx
"navigatesTo": [{ "targetKey": "detail", "data": { "orderId": "string" } }],
"pageInput": { "data": { "orderId": "string" } },
"directEntry": { "behavior": "selector" } } ]
// after generate-pages: "source": { "kind": "tsx", "codeFile": "overview.tsx" }
Genpage-first policy is unchanged. A page's implementation state is an explicit discriminated
source:{ "kind": "intent" }(declared but not yet coded) or{ "kind": "tsx", "codeFile": "…" }(the.tsxthe build uploads). A legacy top-level"codeFile"(noschemaVersion) is still accepted and treated as an implemented tsx page.pageInput+directEntry— the input contract. These two rules used to conflict with no way for an author to satisfy both, so this spells out the resolution:- Every page must be a sitemap subarea (see the membership invariant below). The sitemap is the
download's only membership oracle, so a page reached only by
navigatesTois invisible to download and gets re-created as a duplicate on the next build. - A detail page therefore lives in the app navigation, which means a user can open it with no
input at all — the
orderIditspageInputdeclares simply is not there. - So a page that declares
pageInputmust also declaredirectEntry, which is what that state renders:{ "behavior": "selector" }(show a picker, then the record) or{ "behavior": "emptyState" }(explain, and render nothing broken). An optionalnoteis passed to the generator verbatim. Without this the generated page readundefinedcontext on a path a user reaches by clicking the nav entry. - Every key in
pageInput.datamust be produced by an incomingnavigatesTo[].dataedge. An input nothing supplies is either a typo or a page that can only ever be entered directly; both generate a page reading a key no caller ever sets.
The alternative — allowing navigation-only pages — was rejected: it would need the sitemap to stop being the membership oracle, and the duplicate-page bug it prevents is worse than the extra nav entry.
directEntryalso survives download (it is carried in the page manifest), because a spec that lost it would fail its own validation on the next build.- Every page must be a sitemap subarea (see the membership invariant below). The sitemap is the
download's only membership oracle, so a page reached only by
Validation is profile-scoped:
design/planaccept intent pages; adeploybuild (the default) requires every page implemented.key(schemaVersion 2, required, unique) is the page's single stable identity — used bynavigatesTo[].targetKey, thePAGEREF_<key>navigation placeholder, and thepagesitemap subarea. Renaming a page never changes its key. It must match^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$, be unique across all pages in the spec, and (for an implemented page) itscodeFilepath must be unique and workspace-confined: a relative path to a regular file inside the app folder. Rooted, drive-relative and alternate-stream paths, parent escapes, symlinks and junctions are refused.navigatesTo:[{ "targetKey": "<page key>", "data": { … } }]— declared page-to-page navigation (custom ids travel indata, read aspageInput?.data?.<key>on the target).Page-name uniqueness is enforced only on pages this run creates. A page carrying a
pageIdis a PRE-EXISTING deployed page (edit-snapshot); a page without one is NEW. Two NEW pages (or a NEW page colliding with any other) that share a name (case-insensitive) are rejected. But a case-insensitive duplicate purely among pre-existing pages (both carry apageId) is a warning, not an error — a downloaded app can legitimately contain two pages the run didn't create (authored by different people/tools), and an unrelated edit (e.g. a form change) must still build. The pages phase matches bypageId/key, never by name, so distinct-id same-name pages build correctly; rename one in Maker to disambiguate the navigation.A straight double quote (
") in a pagenamedraws a lint warning. The name is stored exactly as written, but a page an earlier release created throughpacholds each one as\"on the page's own record until a build rewrites its name. The navigation shows the page subarea'stitle, which the build writes as given. A download reads the name without those backslashes, so a rebuild does not add more. Use typographic quotes (“ ”) or an apostrophe to keep the name the same in every page, old or new.pageInput:{ "data": { … } }— the input this page expects when navigated to.Durable page manifest. The build writes a
<app-unique-name>_pagemanifestweb resource carrying{ schemaVersion, pages: [{ key, name, pageId, purpose, dataSources, navigatesTo, pageInput }], design }. This manifest is the source of truth for a download round-trip: download fetches it, enumerates deployed pages fail-closed, and usesreconcilePageIdsto reconstruct keys and reverse-normalize navigation placeholders back to"PAGEREF_<key>"in each page's source. A page the manifest does not bind (a legacy or Maker-authored app) keeps thekeyan earlier download of the app gave it — read from theapp-spec.jsonalready in the output folder when it names this app inapp.uniqueName, matched bypageId— and only a page with neither gets a fresh key. A key never changes between two downloads of an unchanged app: a copy of the spec deployed to another environment is bound to the pages it built there by key. When that file gives one key to two pages (or one page two keys) for a page the manifest does not bind, the download stops (page-keys-ambiguous) unless--reset-page-keyssays to give those pages fresh keys.Three-authority page identity. Generative-page management consults three authorities, each for a distinct question — all matching is by id, never by display name:
- IDENTITY — the
<appUnique>_pagemanifest(key → pageIdmap). For an edit-snapshot spec (downloaded from a live app), the spec's ownpages[].pageIdis the highest authority and outranks the manifest. - EXISTENCE — the env-wide page list read through the SDK (every page of the environment,
drafts included; no app filter). This set alone decides
whether an id is still live. An unplaced id needs a local creation receipt for this app/key/id
and a decoded stored name exactly equal to the spec page name; otherwise
unproven-manifest-idhalts, never requests a replacement CREATE. The build takes this app's PUBLISHED navigation as proof: a page that is only in its saved but unpublished navigation halts with advice to publish the app first. If it is this app's page, add it to the app's navigation withnode "${PLUGIN_ROOT}/scripts/genpage.js" add-to-app --env <envUrl> --app-id <this app's id> --page-id <page id>(it publishes the app and proves the page in what runs) and re-run; otherwise remove the stale id from the manifest/spec (or delete the page withnode "${PLUGIN_ROOT}/scripts/genpage.js" delete --env <envUrl> --page-id <page id>, which says what it would remove and deletes nothing until it is run again with--allow-destructive— ask the user first, it is permanent) and re-run. A read failure HALTs (pages-existence-failed). A create's identity is written down before the create is sent (apendingrecord in the build workspace), so a create whose answer was lost is settled by the next build and never repeated as a second page: the page found under the name the create sent is adopted (a creation receipt is written) and updated like any page that build created; one found under another name is apages-identity-conflict— neither adopted nor updated; with none found, the create is sent once more under the same id. - MEMBERSHIP — the app's sitemap
GenPageIdset (read viafetchSitemap— fail-closed, discriminated). This set alone decides placement, download enumeration, and verify coverage. A read failure HALTs (pages-sitemap-read-failed).
- IDENTITY — the
Teardown page scope. The manifest supplies candidates, not permission to delete. A candidate is deleted only when it is in this app's sitemap (published, or saved but unpublished — an app that was never published has only the saved one, which is read for it — a page another app's saved navigation still references is refused by the platform and kept) or a local app/key/id creation receipt proves it, with its stored name corroborating the receipt. "In this app's sitemap" means an ENTRY of its navigation names the page (a
SubAreaunderSiteMap/Area/Group, either quote style; names exact, as XML is case-sensitive): aGenPageIdthat sits in a comment, a CDATA section or a processing instruction is text and proves nothing, and a navigation that is not exactly one well-formed XML document (one root, balanced tags, quoted unique attributes, no document type declaration) keeps every page and records nothing. A sitemap found by the app's unique name (a never-published app whose layer has no sitemap component) is the app's only when its current row carries that name. Other candidates are kept with a manual-removal hint. The build writespage-ownership.created.<hash>.jsonin its workspace after an acknowledged create, before manifest persistence/placement. Version-2 records include an opaque SHA-256 fingerprint of the normalized target HTTPS origin (lower-case host, no path or trailing slash), not its URL. Lookup and consumption require that same fingerprint; another target's records stay untouched. There is only this environment-bound format. An unknown version, malformed or unreadable file halts with its path: inspect it; delete it only if no page it names still exists. These records contain no environment routing; copied baselines, downloaded ids, remote manifests and diagnostic journals cannot substitute for them. Without a workspace, off-sitemap ids are kept or halted. Dry-run lists every candidate without writes; absent rows are labeled "not found" with their manifest name only. Before app removal, the verified set is saved as localpage-ownership.teardown.<hash>.jsonrecords. An unreadable proof or failed record write leaves the app intact. A retry uses those records even whenpages[]is empty and the app has already gone. Proven pages still undeleted keep their records, manifest and solution and prevent a successful result. Only completed deletion or confirmed absence consumes the records. A page a form still embeds (theMscrmControls.UxAgentControlcontrol, whoseRefIdholds the page id) is not deleted: teardown reads every form in both layers before it deletes anything and stops, keeping the app, the page, its manifest and the solution, with an error that names the form. Take the page off that form and run teardown again. The dry run names each form that would stop the apply and reports itself as failed.Workspace clearing preserves ownership.
--clear-workspacerefuses while any unconsumed local ownership record remains, including other apps/environments. The refusal names each record file. Teardown consumes a record when it deletes or confirms the page's absence; a record whose page you have confirmed gone may be deleted by hand. Resume in the original app/environment before clearing; do not relabel receipts. A record arriving while the workspace is isolated keeps that isolated directory and reports its path.Every page must be in the sitemap. Validation rejects a page that is not referenced by a
pagesubarea inappShell. Navigation-only (headless) pages — reachable only by aPAGEREF_call but absent from the sitemap — are not supported; they are not owned by the app. A "detail" page is a normal sitemap page that receives caller-supplied context viapageInput.pageId(optional — edit-snapshot only). A spec produced bydownload-model-app.jscarries each page's deployedGenPageIdaspages[].pageId(env-specific GUID). A fresh, hand-authored spec omitspageId— it is portable across environments. On rebuild the specpageIdis the highest identity authority (outranks the manifest), confirmed against EXISTENCE — so a downloaded app (including Maker-added pages) rebuilds against the correct existing page without duplication.What a page round-trip carries — and what it does not. A download brings back each page's code, prompt,
dataSources, the id of the model that generated it (pages[].model), its connector and Custom API bindings (pages[].connectorBindings,pages[].actionBindings, below) and its identity; the build sends the model with every update, and the page's own is kept when the spec has none (the SDK writes only what differs). What no spec can bring to another environment is what the bindings name — the connection references, the Custom APIs and the service resources (below).model(optional). The model id a page was generated with, e.g."gpt-4.1"— letters, digits and. _ : / @ + -, at most 100 characters. A download writes it (an id outside that shape is left out, with a warning); an authored spec may omit it, and then a rebuild of an existing page keeps the model that page has.connectorBindingsandactionBindings(optional). The two lists a page holds in itsconfig.json, each a list of objects. A spec states an entry by the properties the references document, each with a value of a conservative shape known to be safe — an allowlist (references/connectors.mdandreferences/custom-api.mdsay what they mean):{ "connectorBindings": [ { "logicalName": "new_msnweather", "connectorId": "/providers/Microsoft.PowerApps/apis/shared_msnweather", "dataset": "", "operations": ["CurrentWeather"] } ], "actionBindings": [ { "name": "new_ApproveOrder", "isFunction": false, "boundEntityLogicalName": "salesorder", "displayName": "Approve Order", "parameterKinds": { "Comment": "String" } } ] }List Property Its value connectorBindingslogicalNamean identifier: a letter, then letters, digits, _ . -connectorId/providers/Microsoft.PowerApps/apis/<identifier>, or the identifierdataset"", a plain name (server,database,default), or anhttp(s)URL with no user-info, no query and no fragment, whose host is DNS labels and whose decoded path segments are labels, written in its canonical form — exactly as a URL parser gives it back: no.or..segment (plain or percent-encoded), a lower-case scheme and host, no default porttablesa list of GUIDs or plain names ( [dbo].[Orders])tableDisplayNamesa list of labels: letters, digits, dashes, spaces and _ . , ; : ' ( ) & + !— no URL, no=operationsa list of identifiers actionBindingsname,boundEntityLogicalNamean identifier displayNamea label isFunctiontrueorfalseparameterKindsa map from a parameter name (a letter or _, then letters, digits,_) to one of the ten declared primitive kinds the page runtime accepts (Boolean,DateTime,Decimal,Float,Integer,Money,Picklist,String,StringArray,Guid)EntityReference,EntityandEntityCollectionare not declared kinds: an unsupported declared kind makes the runtime drop the whole binding. Lookup inputs remain structural call values, not entries in this map; lookup authoring hints are discovery-only metadata, never App Spec binding properties. Sparse primitive maps are valid; a lookup-only API can stateparameterKinds: {}. To deliberately correct an existing bad map, state its verified primitive entries explicitly (or{}for lookup-only inputs). OmittingactionBindingspreserves the page's existing payload instead of correcting it; no unsupported declaration is silently stripped or changed toGuid.No text of any of them may be shaped like a token (a known token prefix such as
ghp_oreyJ, an authorization scheme such asBearer …, or a run of 32 or more letters and digits that mixes both). Nothing else is in a spec, and a list is stated only WHOLE. A binding a page holds can carry anything: a connection id of the environment it was made in, a credential someone wrote into aconnectors.json(genpage-upload.jstakes any JSON array) — as a value, as the NAME of a property, in a URL's user-info, query or fragment — or a property a later runtime adds. The spec is what is committed and shared, so when ANY entry of a list holds a key that is not on the allowlist, or a value without its shape, a download leaves the whole list out of the spec — it never states part of an entry, because an entry stated without its identity or a property would make a rebuild replace the page's entry with less — and reports it inpageBindings.notCarried(stderr:WARNING:) by the page, the list, the entry's place and the vetted property, or "an unrecognized property": never a value and never an unrecognized key. A list left out is one a rebuild does not send, so the page keeps it as it is, with no write and no publish. The page folder's ownconfig.jsonis the page as the environment holds it and is not rewritten, so it still holds everything: keep that folder out of version control if a value there is a credential. A spec that states such a property or value is refused by the validator, in the same words. A list that is not a list of objects is left out whole too; neither is ever a refusal of the download. A download writes the lists a page holds (an empty list, ornull, is left out). The build writes a list a spec states, and leaves the page's own alone when the spec does not state it; a list that is stated —[]too — is the page's list, asdataSourcesis. It is read against the page's own entries: a page that already holds what the spec states is not written and not published, and an entry the spec changes keeps the properties the spec does not state (an entry is matched bylogicalName/name).logicalName(a connector binding) andname(a Custom API binding) is what the page's code finds an entry by, so an entry without one draws a warning. The spec carries the lists, which are text; it cannot carry what they name, and a rebuild creates none of it, so each must already exist in the environment you rebuild into: the connection reference each connector binding goes through, and the connection behind it, which holds a user's sign-in (create the reference withcreate-connection-reference.js, or move it in a solution withadd-page-to-solution.js --connection-refsandsolution-settings.js, or declare it inconnectionReferences[]— see Configuration items below — and the build makes it before the pages); the Custom API each action binding names, a solution component unless the spec declares it incustomApis[]; and, for a connector binding that names adatasetortables(a SharePoint site and its list ids), the same resources. A download names what it found, on stderr and aspageBindingsin its JSON result. A rebuild checks them before it writes anything (a build, and a dry run in its plan): it reads the environment's connection references and Custom APIs for the names the pages it writes state, and- stops —
pages-binding-reference-conflict, phasepreflight, nothing written — at a connection reference of that name that is for another connector than the binding'sconnectorId(compared by the connector's name, so/providers/Microsoft.PowerApps/apis/shared_msnweatherandshared_msnweatheragree): the page would call that connector under that name. Give the binding the logical name of a reference that is for the right connector, or, when the reference that is there is the one the page should call (a custom connector made separately in each environment has another id in each), set the binding'sconnectorIdto the one this environment has. Nothing is guessed or made, and a connector that a binding or a reference does not name is never a conflict; - says by name (a warning, and the page is written with its binding all the same — a reference made, or given its connection, later makes the page work without a rebuild) each reference and Custom API that is not there, a reference that is there with no connection (what a solution import leaves when no settings file gives one), an operation a binding lists that the custom connector of its reference there does not define, a Custom API that is the other kind (Action or Function) or bound to another table, and a read that failed (the bindings were then not checked);
- says as NOT CHECKED, by name, what the environment's answer did not prove — never reading it as compatible,
and never refusing for it: a reference row that does not say which connector it is for, or whether it has a
connection — or says it in a form the build cannot read (a
connectoridthat is not/providers/Microsoft.PowerApps/apis/shared_<name>, aconnectionidthat is not text) — and the operations of a binding whose reference names no custom connector. Only two valid connector ids that differ stop the build. Operations are checked only through a custom connector's definition (itsconnectorrow), which is the environment's own and can be another version than the page was made with; a reference whose custom connector lookup is absent, null or not a GUID — which a connector the platform publishes also has — is not proof of which connector defines them. - built-in operations — an
actionBindingsentry named exactlyWhoAmIorRetrieveVersionis a reviewed built-in Dataverse Function, not a Custom API (references/dataverse-operations.md): it is left out of thecustomapiread (a page that binds only them reads nocustomapirow), never called missing, and said as NOT CHECKED — its availability in the environment or player and the signed-in user's permissions; one whose declarations do not explicitly say "unbound Function, no inputs" draws adataverse-operation-shapewarning and is written as the spec states it. A download names them underpageBindings.neededInTarget.dataverseOperations, never undercustomApis: there is nothing to deploy. Any other spelling (whoami) is a Custom API name.
/app-buildernever authors these lists — it writes no connector or Custom API code — so they come from a page a download read. A page you reset tosource.kind: "intent"to regenerate it is generated without connector code: delete its bindings from the spec too, or it keeps bindings its code no longer uses. Thedataverse-operationsfeature flag gates what the/genpageagents author, not the download or the rebuild of bindings a page already holds.- stops —
Safety HALTs (pages phase). The build halts on identity/safety violations rather than proceeding with potentially wrong state:
pages-identity-conflict— specpageIdand manifest disagree on a key, or a duplicate id is detected across two keys, or an off-sitemap id lacks a corroborated local creation receipt. Manual resolution required.pages-manifest-corrupt— the manifest web resource cannot be parsed (two keys mapping to the same id). Fix or delete the manifest and rebuild.pages-shared-across-apps— a page appears in another app's sitemap, published or only saved (not yet published — an app that was never published counts). Detach it from that app first — ask the user, since this changes another app: the halt names the app and prints the command with the app'sidfilled in (<id of app …>stands where the id could not be read, andscripts/apps.js list --env <envUrl> --search <name>gives it), andnode "${PLUGIN_ROOT}/scripts/genpage.js" remove-from-app --env <envUrl> --app-id <that app's id> --page-id <page id>takes the page out of its navigation and publishes it (everything that app has saved goes live with it; the page itself stays) — or detach it in Maker.--allow-destructivedoes NOT bypass this halt. If another app's saved navigation, or the list of apps that were never published, cannot be read, the build halts aspages-shared-check-failedinstead of assuming it is clear. When an app's navigation cannot be read, the whole check is run again, every app read afresh, three times over about 35 seconds first (another build changing that app can leave it unreadable for a moment); an app still unreadable then halts the build, and one that turns out to hold the page halts it aspages-shared-across-apps. The check runs again right before the first page is updated in place, so a page another app takes in while the build runs halts it there too ("became shared across apps while this build ran"); one taken in while the pages upload is written by then, and is reported after the uploads as a warning naming the app.pages-removed— a page is live in the env but no longer in the spec. Re-add it to the spec, or pass--allow-destructiveto detach it from the nav (SubArearemoved; page record left deployed).pages-griffel-shorthand— a page that this run uploads has amakeStyleskey Griffel drops at runtime (all,borderColor,borderStyle,borderWidth,borderBlock*,borderInline*), and is new (no deployed page) or changed (its source no longer hashes to the__contentShathatlast-applied.jsonrecorded for it at the last apply to this app in this environment — the record a successful full or changed-only apply, or a download, writes; for a page it is the hash of the source the build read and sent, and a failed or partial build records nothing). Raised from the pre-write scan, so nothing is created or updated; the message gives the page, each key's line and column, the longhands, and what each way out does: deleting a key changes nothing on screen (Griffel never applied it), writing the longhands makes the style start to render. A page that already exists and is sent again as recorded — or has no record in this workspace — is sent as it is and the build warns with the same detail instead: it ships nothing new. A call the check cannot read is reported as that (with what to change in the code), not as CSS Griffel drops.
Generative pages on forms —
placementandforms[].genPages. A page that only makes sense next to one record (a case summary on the Case form) can be embedded in a Main form instead of the navigation:"pages": [{ "key": "case-summary", "placement": "form", ... }], // "sitemap" (the default) | "form" "forms": [{ "entity": "incident", "name": "Case", "genPages": [ { "key": "summary", "page": "case-summary", "tab": "general", "section": "details", "after": "title", "inputData": { "mode": "compact" } } ] }]Each entry:
key(unique in the form),page(a declared page key, once per form),tabandsection(both required; each must name exactly one place on the form), optionalafter(a column logical name) and optionalinputData(a JSON object handed to the page). Any other key is an error. Aplacement: "form"page is exempt from the sitemap membership rule above, but some form must embed it and the sitemap must not link it. The page is placed as a block (its row plus five reserved empty rows), verified through the form that embeds it, and teardown refuses to delete a page a form still embeds. Limits in this release: the CLI build cannot apply an embed yet — it builds everything else and then haltsform-page-embeds-incomplete(managed-bindings-unavailable), so put the page in the navigation instead; a run with the forms phase but not the pages phase is refused at preflight; and a download does not readgenPagesorplacement: "form"back, so they must be re-authored.Offline evaluation. The app-builder eval harness (
evals/model-apps/app-builder/) grades page-stage structural facts from the spec offline (navigation graph resolution, intent-vs-tsx completeness). Seeevals/model-apps/app-builder/EVAL_GUIDE.md.
Configuration items (optional) — environmentVariables[], connectionReferences[], customApis[], duplicateDetectionRules[], solution.version [2.21.0]
{
"minimumPluginVersion": "2.21.0",
"solution": { "uniqueName": "ContosoDesk", "publisherPrefix": "contoso", "version": "1.2.0.0" },
"environmentVariables": [
{ "schemaName": "contoso_ApiBase", "type": "string", "name": "API base", "defaultValue": "https://api.contoso.com" },
{ "schemaName": "contoso_ApiKey", "type": "secret", "name": "API key" } // value: deployment settings only
],
"connectionReferences": [
{ "logicalName": "contoso_sharepoint", "connectorId": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline" }
],
"customApis": [
{ "uniqueName": "contoso_Escalate", "binding": "entity", "boundEntityLogicalName": "contoso_ticket", "isFunction": false,
"requestParameters": [ { "uniqueName": "Reason", "type": "string" } ],
"responseProperties": [ { "uniqueName": "Accepted", "type": "boolean" } ] }
],
"duplicateDetectionRules": [
{ "key": "same-email", "name": "Contacts with the same email", "entity": "contact",
"conditions": [ { "key": "email", "column": "emailaddress1", "match": "exact" } ] }
]
}
- What the build does. A build makes each declared item in the build solution (and proves it, and each
Custom API parameter, response property and rule condition, a member of it), compares an item that is already
there and writes only the fields that differ, and sets
solution.version(major.minor.build.revision). An unchanged spec built again sends no write. An omitted field is not managed: declaring an item that exists without a field, or without a child list, never clears the field or removes the children. Lint warns withoutminimumPluginVersion: "2.21.0"— an older plugin ignores these fields. A spec without them builds exactly as before. - Values that differ per environment never live in the spec. An environment variable's current value and a
connection reference's connection come from
--deployment-settings <file>, the solution deployment-settings shape (EnvironmentVariables[]withSchemaName/Value,ConnectionReferences[]withLogicalName/ConnectionId). Nothing from the file is printed. Asecretvariable takes nodefaultValue(an error when the spec is built, a warning when it is only read); give it a Key Vault reference through the settings file. A connection the file names must be listed in the environment's connections for the reference's connector, or the configuration step stops (a connection of another connector is not proof). - Consent to a destructive change. Clearing a value, unbinding a reference, removing a Custom API parameter or
property, or removing a rule condition is refused until it is authorized, one change at a time:
--authorize <kind>:<key>:<field>(for example--authorize environmentVariableValue:contoso_apibase:value,--authorize connectionReference:contoso_sharepoint:connectionId). The key is the declared name, lower-cased (a rule's ownkeyas written); a refused change (DESTRUCTIVE_CHANGE_UNAUTHORIZED) names the exact token it lacks. A token for an item the spec does not declare is refused before anything runs. - Pages wait for what they call. A page whose bindings name a declared connection reference or Custom API is not
written until the item is usable — the reference made and bound to a proven connection, the Custom API made with an
implementation (a plug-in type) the build can see: the build stops before the pages with
configuration-prerequisite-not-appliedinstead of warning and writing a page that cannot reach its data. A declared Custom API without an implementation is still built (a scaffold); only the pages that call it wait. A reference already there for another connector still stops the build (pages-binding-reference-conflict). - Lost answers. A configuration write is sent once in a build, and a lost answer is never retried. Without
configurationIdentity, a new configuration row, children included, is created once, at a stable id, and recorded before it is sent: when its answer is lost the step stops withconfiguration-create-pending(configuration-create-publication-pendingfor a new rule's publication), and the next build stops the same way and sends no write untilconfiguration-recovery.jssettles it (seedocs/configuration-create-recovery.md), so the row is never created again at a new id. A lost answer to a change of an existing row stops the step as unknown (configuration-incomplete). Protected rows stop as described underconfigurationIdentityin app-spec-schema-advanced.md. - Not carried by teardown or download. A teardown never deletes a configuration item (nothing proves this app
owns it); it names each one as kept, by name only, and says when a Custom API bound to a table the spec makes will
block that table's delete. A plain download does not bring these items back into the spec. A managed download
(
--include-managed --managed-manifest <store file>) of an app built withconfigurationIdentity: "stable-v1"brings back each environment variable the store proves unchanged, without its value, default or value schema, each connection reference, without its connection, and each Custom API that has no implementation yet; it never brings back a duplicate rule (seeconfigurationIdentityin app-spec-schema-advanced.md).
appShell
{ "areas": [ { "label": "Main", "icon": "new_areaicon.svg", "groups": [ { "label": "Records", "subAreas": [
{ "entity": "new_customer", "title": "Customers" }, // a table (nav icon = its TABLE icon)
{ "dashboard": "Operations", "title": "Overview", "icon": "new_overview.svg" }, // a built dashboard (by name)
{ "url": "https://…", "title": "Help" }, // an external link
{ "url": "$webresource:new_home.html", "title": "Home" }, // a declared web resource
{ "page": "overview", "title": "Overview" } // a genpage — KEY (schemaVersion 2)
] } ] } ] }
- A subarea names exactly one target (lint-enforced):
entity(a table),dashboard(the name of adashboards[]entry — auto-pinned as an app component so the app includes it),url, orpage(thekeyof apages[]generative page at schemaVersion 2; the name for legacy specs — surfaced as aGenPagesitemap subarea). - The navigation needs an entry Dataverse will take — for a new app. Dataverse refuses to create a sitemap with no
non-empty area holding a non-empty group (HTTP 400: "SiteMap needs to have a non-empty Area with a non-empty Group"); it
accepts the same navigation when the sitemap of an app that already exists is updated (measured: saved and published).
A new app whose navigation has an
entity,dashboardorurlentry is created before its pages exist: its first navigation leaves everypageentry out, and the pages phase writes them in afterwards. A new app whose navigation holds onlypageentries is built the other way round: the build creates the pages first and then the app, with them already in its first navigation (asapps.js create --page-idmakes an app around a page). So a new app needs at least one entry in a group in an area — a table, dashboard, url or page entry. A run that cannot create the pages first (one without the pages phase, or a changed-only re-upload) still refuses a navigation of onlypageentries for a new app. An existing app is refused for neither a navigation of onlypageentries (its navigation is written from the whole spec once its pages are built) nor one with no entry at all: the build goes on, and for the empty one it warns that the app is left with no navigation entries — any it has now are removed, which the destructive- operation check asks--allow-destructivefor. A spec with noappShell.areasis refused for every app, since there is no navigation to build the app's sitemap from. A spec with noappShell,areas: [], an area with no group, or a group with no entry still validates — a data-only spec has no navigation, and a downloaded spec carries the app's own, which can be empty — but a build that includes the app-shell phase refuses what a new app cannot be built from before it writes anything: the dry run marks the app step? unknownwith the reason and counts it among the steps that would stop the build (with a live plan or without one),--applyhalts withapp-navigation-empty, andlint-app-specwarns. Whether the app exists is read only when the verdict depends on it (a navigation of pages only, or with no entry); when it cannot be read (--no-live-plan, a failed read) that navigation is not refused: the build warns that it could not check, and goes on. - Areas and groups take
label; subareas taketitle. Each level accepts only the keys the build reads — area:label,icon,vectorIcon,iconDescription,groups; group:label,iconDescription,subAreas; subarea:title, one target,icon,vectorIcon,iconDescription— and anything else is a validation error, so atitleon an area says "did you meanlabel?" rather than deploying an untitled area. - Rebuilding an existing app keeps what the spec cannot describe. Each nav entry the spec keeps is
written onto the live entry it corresponds to (a subarea by its target; an area or group by its
label), so the live entry's id, its other attributes (
Client,Sku,AvailableOffline, …) and its titles in other languages survive; only the label, title, target and icons the spec sets are applied. A title the spec does not give is kept: an area, group or entry whoselabel/titleis empty or left out keeps the title it has in the environment, and the build says so — a rebuild never clears one, so state a title to change it. (An entry whose title the baseline below shows the spec used to state, and the spec now leaves out, loses it: that is an edit.) An area or group with no entries and no label — what an earlier download wrote for each empty group of an environment whose base language is not 1033 — is the environment's empty group when there is one of each. With more than one on either side, which is which cannot be told, so none is paired: the spec's are written as new, untitled ones, and the build names each environment group it does not keep, with its title. Give the spec's group the label it has in the environment to keep it. Adashboardentry is written the way the designer writes one, withUrl="/workplace/home_dashboards.aspx"— without it the app shows a placeholder icon for the entry, and--verifyfails it. - A nav change made in the designer after a download is kept, not reverted. Download and every
successful apply record the spec as a baseline in
.maker-workspace/last-applied.json, for that environment and app. When the spec still has the baseline's title or icon for an entry and the environment has something else, the build keeps the environment's value and says so, and--verifyaccepts it — change the spec to change it. With no baseline for the environment, the spec wins and the build reports each change it makes to an existing entry. urlis either a real http(s) link or a web-resource reference —$webresource:<name>(the form the Site Map Designer writes for a "custom page backed by an HTML web resource") or the equivalent/WebResources/<name>path. A web-resource reference passes through as-is, like a platform icon ref: it is a live/OOB value a downloaded app carries, and the resource is frequently managed or owned by another publisher, so requiring it to be declared would break the download→build round-trip. Download captures its content intowebResources[]when it can safely do so (own prefix, unmanaged). Any other scheme is rejected: ajavascript:orfile:nav entry in a shipped app is a script-injection / local-file-exfil vector.- Any area or subarea may set
icon. This is either a declared imagewebResources[]NAME (png/jpg/gif/svg/ico — validated againstwebResources[]) OR a platform icon reference — a path (/WebResources/…,/_imgs/…) or a$webresource:<name>— which a downloaded app carries verbatim (including OOB system icons like/WebResources/msdyn_.../SitemapIcon/CDSEntity). A platform reference is passed through as-is (case-preserved) and is not required to be a declared web resource, so a download→build round-trip is never blocked by an OOB icon the download itself wrote. Icons are chrome, not a target — they don't count toward the "exactly one target" rule. - Entity-subarea nav icons round-trip. An
entitysubarea'svectorIcon(andicon) are preserved across a build when they are a platform reference — a modern custom nav glyph (/WebResources/<pub>/icons/x.svgor$webresource:<name>.svg) is emitted onto the sitemap<SubArea>and round-trips through download. Only a bare Fluent token (e.g.Shop) is dropped from an entity subarea (a raw token there breaks the modern app-designer property pane) — and that drop is surfaced as a warning, not silent. Alternatively, set the table's own icon viaentities[].vectorIcon(an SVG web resource →IconVectorName), which the modern designer also renders for the table. For a non-entity subarea (url/page/dashboard),vectorIconis any platform reference (an SVG path or a$webresource:<name>.svg) — a bare Fluent token is lint-warned. - Custom nav icons are made portable on download. A path/
$webresource:reference assumes the web resource already exists in the target env, so a naive download→rebuild into a different env renders a broken icon. To fix this, download re-declares the referenced web resource intowebResources[](with its base64 content, flaggedexternal— see above) so the build recreates it cross-env — but only when the WR is (a) owned by this app (its name starts with the app's own publisher customization prefix), (b) custom (unmanaged), and (c) an image type. A foreign-prefix, managed, or OOB reference (e.g./WebResources/msdyn_.../CDSEntity) is left as a bare reference — recreating a foreign publisher prefix on a fresh env would hard-fail the build, and OOB icons already exist everywhere. If an own-prefix custom icon can't be captured (already absent on the source env, or the read fails), download emits a warning: the sitemap reference still round-trips, but the icon will be missing in a fresh env until you declare the web resource yourself. The build also emits a non-blocking portability warning when an own-prefix path-referenced icon is not declared inwebResources[].
design (optional — page design contract)
{ "accentColor": "#0f6cbd", "density": "comfortable", "cornerRadius": "medium",
"darkMode": "system", "layout": "cards" }
- Shared styling tokens threaded to every page so generated pages look consistent with each other and the model-driven shell (both Fluent UI V9). Unknown keys are rejected.
style(optional) — the maker's own look, in words, when they ask for one: a screenshot or mockup read into colors and fonts, a website to match, or a description ("navy #0b2545 primary, gold #c9a227 accent, warm white #faf7f0 background, Georgia headings, 2px corners (from: screenshot)"). Give concrete values: hex colors with their roles, a font with a fallback, corner radius, density. It wins over the default model-driven look: the page plan carries it as aStyling:line that starts withMaker-requested:, and every page applies it (references/rules.md→ Maker-requested styling, which also says what a page cannot match). Omit it to keep the default look. It must be a non-empty string. It is stored in the app's page manifest with the rest ofdesign, so a download keeps it.- During generate-pages the design contract is passed to each headless
page-builderagent so all generated.tsxfiles apply the same Fluent UI V9 token set (accent color, density, corner radius, dark-mode policy). Runnode scripts/preview-app.js @<dir>/app-spec.jsonto preview the design contract alongside the rest of the app before approving the build.
sampleData (optional)
Keyed by entity schemaName. Choice values are labels (resolved to ints) — for both inline
options[] columns and globalChoice-backed columns (write "Platinum", not 100000000; the
engine resolves it, and lintAppSpec flags any label that isn't a declared option). Raw option ints still
work. Relate records to parents with $parent (one) or $parents (several — for a junction row), and
set a custom status with statusReason. All are topologically inserted and bound via the lookup nav-property.
{
"new_customer": [ { "new_name": "Northwind", "new_tier": "Pro" } ],
"new_ticket": [ { "new_subject": "Down", "new_priority": "High", "statusReason": "Passed QA",
"$parent": { "entity": "new_customer", "match": { "new_name": "Northwind" } } } ],
// a junction row binds BOTH parents — no post-build association script needed:
"new_assignment": [ { "new_name": "WO-1 / Jane", "new_role": "Lead",
"$parents": [ { "entity": "new_workorder", "match": { "new_name": "Replace compressor" } },
{ "entity": "new_technician", "match": { "new_name": "Jane Doe" } } ] } ]
}
$parentsis the array form of$parent— each entry binds one lookup, so a junction/intersect row links to every parent it points at (the engine sets each<lookup>@odata.bind).- Self-referencing parents work. A row may point at another row of the same entity — an org
hierarchy, a "reports to" chain — as long as the references form no cycle:
Order in the array does not matter; the engine seeds such rows in dependency waves, creating each row only after the row it points at. A cycle (including a row that is its own parent) is rejected by"new_org": [ { "new_name": "Head Office" }, { "new_name": "North Region", "$parent": { "entity": "new_org", "match": { "new_name": "Head Office" } } } ]validateAppSpec— so by the build on load, and byscripts/lint-app-spec.js, which runs it — because no creation order can satisfy it. lookup(optional) names which relationship a parent bind goes through, by the lookup'sschemaName:
It is only needed when two or more"$parent": { "entity": "new_org", "lookup": "new_GroupAncestorId", "match": { "new_name": "Head Office" } }OneToManyrelationships connect the same pair — common for a hierarchy table with both a "parent org" and a "group ancestor" self-lookup. Without it the bind would be ambiguous, sovalidateAppSpecrejects it rather than silently picking the first declared relationship and asserting something false about the data.statusReasonmust match a declaredstatusReasons[]label on the entity; the engine resolves it to the rightstatecode+statuscode(so "Completed orders with Passed/Pending QA" just work). The status option value is captured during the data-model phase — if you setstatusReasonon a sample row, don't--skip data-modelin the same run (the build halts loudly rather than silently inserting a default status). Re-running withdata-modelis safe: status reasons are created with a pinned, deterministic value, so a re-run skips the existing one instead of duplicating it.- MultiChoice sample values are a comma-separated string of option labels (
"A,C") or ints ("100000000,100000002") — each known label token is resolved.
ai (optional — AI feature flags and row-summary configuration)
Controls AI-powered features that the platform activates at the app/table level. The block is
entirely optional; omitting it writes no AI setting, so the app's existing AI settings are left as
they are — a feature follows the environment's value only where the app has no value of its own
(removing an app-scope value is not something the build does). Any ai block writes every feature
below as an app-scope value, which overrides the environment's.
Admin-gated. AI features turn on only where the environment administrator has enabled them in Power Platform Admin Center (Environments → Settings → Product → Features). The
ai-featuresbuild phase preflights each setting (RetrieveSettingvia the SDK) and skips / warns for anything off — it never fails the build and cannot flip admin or tenant switches.Standalone preflight:
node "${PLUGIN_ROOT}/scripts/ai-preflight.js" --env <envUrl> [--app <uniqueName>]Prints each feature's on/off status and the exact admin action needed for anything off. Never fails.
"ai": {
// appFeatures: opt specific AI features in or out for this app (all optional).
//
// `false` DOES NOT MEAN "leave alone". It writes an explicit app-scope override that BEATS the
// org value, so setting it on a feature the org has enabled turns that feature OFF for this app.
// To defer a feature to the platform instead, give it that setting's platform-default value — still
// an app-scope value, so the app gets the platform's default rather than the environment's setting.
//
// Every one of these settings is a tri-state, and the numbers differ by setting (taken from the
// platform's own settings UI):
// formFill, formFillSuggestions, formFillSmartPaste, formFillFiles, nlSearch, m365
// -> 0 = Default (defer to the platform), 1 = Off, 2 = On
// nlChart -> 0 = Off, 1 = Auto (its platform default), 2 = On
// The build writes `true` as 2 for every feature and `false` as that setting's Off — 1, or 0 for
// nlChart. (Before AB#6714731 it wrote 1 for `true` outside the form-fill family, which is Off for
// nlSearch and m365 and only Auto for nlChart.)
// An explicit integer (0-1000000) is written verbatim, e.g. to choose the platform default; the
// bound mirrors the SDK's own, so an out-of-range value is rejected here rather than aborting the
// build half-applied.
//
// These write PER-APP settings, which are distinct from the org-level admin gates the build
// preflights. The gate is NOT a precondition: every write is attempted and then verified, and a
// gate is read only to EXPLAIN a write that did not persist (AB#6688904 — for four of these
// features the "gate" IS this same per-app row, so reading it first made a brand-new app look
// forbidden and nothing was written at all). A feature whose write does not persist is surfaced
// with a warning naming the admin action; it is never silently reported as applied.
// DISABLING is treated identically — a `false` is written whatever the gate says, which is why an
// incorrect `false` is the more damaging mistake of the two.
"appFeatures": {
"formFill": true, // Copilot-assisted form fill (data entry) — writes 2 (On)
"nlSearch": true, // natural-language grid/view search (data exploration) — writes 2 (On)
"nlChart": 1, // natural-language chart / AI data visualization — 1 = Auto, the platform decides
"m365": false // M365 Copilot integration — writes 1 (Off); by default it is left at 0 (Default)
},
// summaries: configure the row-summary (Copilot summary card) feature per table.
"summaries": {
"default": "auto", // "auto" (default) | "off" — the app-level default for all tables
"tables": {
// per-table overrides; keys are entity schemaNames (case-insensitive, must be declared
// in entities[]).
"new_ticket": {
"enabled": true,
"instruction": "Summarise the ticket status, priority and latest comment in two sentences.",
"columns": ["new_status", "new_priority", "new_description"]
// columns[] constrains which fields the summary reads; each entry must be a declared
// column schemaName on that entity (validation-enforced).
},
"new_customer": { "enabled": false } // opt this table out
}
}
}
summaries.default: "auto" candidate policy. When default is "auto", the skill
auto-selects tables that are good row-summary candidates and skips those that aren't:
- Skipped automatically: lookup-only tables (no descriptive columns), config/reference tables, and junction/intersect entities.
- Always skipped: the Dynamics 365 app-owned tables
incident(Case),lead, andopportunity— they provide their own summaries and the feature is not available for them. Explicitly settingenabled: truefor one of these insummaries.tablesproduces a lint warning.
Prompt authoring guidelines (for instruction):
- Write for meaningful insights, not field/value repetition.
- No record GUIDs in the output.
- Pull in recent activity where relevant.
- Use audience-appropriate tone (e.g. internal ops vs. customer-facing).
- State an explicit output shape: a short paragraph is the recommended default.
Validation rules (validateAppSpec / lintAppSpec):
The two gates are not the same, and only one of them runs on every build.
validateAppSpecis the hard schema gate:build-model-app.jsruns it on load, so--applyrefuses on its errors.lintAppSpecis the authoring guardrail, and the build does not run it — its findings only reach you throughscripts/lint-app-spec.js(which runs migrate →validateAppSpec→lintAppSpec) or the skill's plan gate. So a rule described below as enforced by the lint is one an unlinted spec will carry into a build and fail at the platform. Where it matters, the rule names its gate.
ai.appFeatureskeys must be one offormFill · formFillSuggestions · formFillSmartPaste · formFillFiles · nlSearch · nlChart · m365; values must be a boolean or an integer between0and1000000(hard error) — the same range the SDK enforces, so an out-of-range value is rejected here rather than aborting the build half-applied. The boolean spelling is not a flat1/0:truewrites2(On) for every feature, andfalsewrites that setting's Off —1for most, but0fornlChart, whose1means Auto.0means Default (defer to the platform) everywhere exceptnlChart. Use an explicit integer for any other state, such as the platform default.falseis not "leave alone". It writes an app-scope override that beats the org value, and unlike enabling it is not gated — sofalseon a feature the org has enabled will turn that feature off for this app. To defer a feature to the platform, give it the setting's platform-default value instead (0, or1fornlChart).- Omitting
ai.appFeaturesdoes not mean "no AI features": a spec carrying anyaiblock gets the defaultsformFill · nlSearch · nlCharton (2) andm365left at its platform default (0), and--verifyreconciles that whole resolved set. - A rejected row-summary publish does not authorize name-based cleanup. Same-name AI models are kept and reported because the failed SDK call returns no created-model id to the build.
ai.summaries.defaultmust be"auto"or"off"(hard error).ai.summaries.tableskeys must match a declared entityschemaName(case-insensitive, hard error).columns[]entries must be declared columnschemaNamevalues on that entity (hard error in both validate and lint).- Lint warnings:
incident,lead, andopportunityare Dynamics 365 app tables (Case / Lead / Opportunity) that provide their own row summaries — configuring one as a summary table warns, because the row-summary feature is not available for them.- A table with no descriptive columns (only lookups / system fields) warns that a row summary may not be useful.
- A table's entry is read for
enabled,instructionandcolumnsonly, and validation rejects no other key — so any other key warns that it is ignored. The prompt isinstruction: apromptkey warns and names it. When a summary is enabled, omittinginstructionuses the default prompt; settinginstructionalone does not enable a table underdefault: "off".
personas[] (optional — security roles)
Authors one security role per persona, sized to the entity access that persona's
jobs-to-be-done need, and associates the app with it. A new app is associated with the System
Administrator role only, so without a persona role users who have no maker-level role cannot open it;
personas[] produces a working access model so the app opens for real users.
An app that already exists keeps the roles associated with it: a spec with no personas[] leaves
them as they are, which is how an extension of such an app is written (a plain download carries none). Do
not list an existing role as a persona to silence the lint — a persona's role is converged to exactly
the privileges declared, and a role the build did not author is refused. Give an existing role access
to a table the spec adds with roleGrants[] (below). Opening the app and using a table are two
questions: lint and write-app-spec-doc.js keep them apart, and flag a new table that no persona job
and no roleGrants[] entry grants a privilege on ("no access declared").
personas[] is captured first during authoring (Level (a0), before the data model): the jobs
are what the app exists to do, so they drive which tables and surfaces exist. privileges[] is
filled in later (Level (c)), once the entities they reference are agreed.
The model is deterministic: you DECLARE the access each job requires — the builder never infers privileges from a job's text. It unions every job's declared access into the persona's one role (max scope wins per entity+access) and applies it with replace semantics (a rebuild that drops a privilege removes it — the role converges to the spec).
A persona written by a managed download. A download with --include-managed --managed-manifest <store file> that restores a declared business process flow whose securityRoles name a persona the
downloaded spec lacks writes that persona from its role, but only when a rebuild provably leaves the
role exactly as it is: one role of that name in the root business unit, made by a build and unmanaged,
in the app's solution, holding only table privileges that compile back to exactly what it holds, the
flow's grants included. The persona has one job, Privileges read from the environment, and
appAccess: false when the app is not associated with the role — read from every page of the app's
role associations; an association answer that is incomplete, malformed or refused proves nothing, so
no persona is written (a role it missed would otherwise be written as not associated, and a build
would remove its access to the app). A role lookup the server cuts short proves nothing either. From then on the spec owns that
role like any other persona: a privilege someone adds to the role outside the spec is removed by the
next build, and the download says so in a NOTE. When any of this cannot be proved, no persona is
written and the flow is left out instead, with the reason (see the business process flows' notes in
app-spec-schema-advanced.md).
"personas": [
{
"persona": "Field Technician", // the role name (unique across personas[])
// jobs[]: the units of work this persona does. Each job DECLARES the entity access it needs.
// `surfaces[]` is optional and documentary — the views/forms/pages that let them do the job.
"jobs": [
{ "name": "Complete work orders",
"surfaces": ["My Work Orders", "Work Order"],
"privileges": [
{ "entity": "msdyn_workorder", "access": ["read", "write"], "scope": "businessUnit" },
{ "entity": "msdyn_workorderproduct", "access": ["read", "create", "write"], "scope": "user" }
] },
{ "name": "Look up customers",
"privileges": [ { "entity": "account", "access": ["read"], "scope": "organization" } ] }
],
// additionalPrivileges (optional): baseline access not tied to one job (shared reference tables,
// extra app components). Unioned in like a job's privileges.
"additionalPrivileges": [ { "entity": "product", "access": ["read"], "scope": "organization" } ],
// appAccess (optional, default true): when true, the build injects a read privilege on the app's
// appmodule AND associates the app to this role, so the app opens for the persona. Set false to
// author a data-only role that does NOT get the app (e.g. a back-office role).
"appAccess": true,
// assignTo (optional, grant-only): assign the finished role to existing teams/users by GUID. The
// build only ADDS members (never revokes). Omit to author the role and let an admin assign it.
"assignTo": { "teams": [], "users": [] }
}
]
Field reference
persona(required) — the security role's display name; also its idempotency key. Must be unique acrosspersonas[].jobs[](required, ≥1) —{ name, description?, surfaces?, privileges[] }.privileges[]is required and non-empty per job.jobs[].surfaces[](optional) — the view/form/page names (or pagekeys) that let this persona do the job. Never applied to Dataverse. It renders the jobs→surfaces traceability table inmodel-app-plan.md; a job with nosurfaces[]is flagged byspec-lint.jsas a design gap, and a surface that matches nothing this spec builds is flagged too (lib/surface-resolver.jsresolves each entry againstviews[]/forms[]/pages[](key or name) /dashboards[]/entities[]/ sitemap subarea titles, case-insensitively). Both are warnings, never errors — a surface may legitimately name an out-of-the-box artifact this spec does not author.verify-model-appadditionally rolls a deployed failure up to the job that depended on it (job-surface), so "view X is missing" also reads as "persona P can no longer do job J".privileges[].entity(required) — a table logical name (e.g.account,msdyn_workorder). May be a table this spec doesn't author (standard/system tables are common); existence is resolved against live metadata by the build, not at lint time.privileges[].access(required) — one or more ofread · create · write · delete · append · appendTo · assign · share.privileges[].scope(optional, defaultuser) —user(Basic) ·businessUnit(Local) ·parentChild(Deep) ·organization(Global), least→most permissive.additionalPrivileges[](optional) — baselineEntityPrivilege[]unioned into the role.appAccess(optional boolean, defaulttrue) — inject app-module read + associate the app to the role.businessUnitId(optional GUID) — business unit to create the role in (defaults to the org root BU).assignTo(optional) —{ teams?: GUID[], users?: GUID[] }, grant-only.excludes[](optional) — what this persona deliberately does not do in this app, e.g."Approving budgets — handled in the Finance app". Never applied to Dataverse; likejobs[].surfaces[]it is documentary, and it renders as a Deliberately out of scope list beside the jobs→surfaces traceability table inmodel-app-plan.md. An app's scope is defined as much by what it leaves out as by what it includes, and the exclusions are what let a reviewer tell two apps built over the same tables apart — an omission nobody was shown cannot be approved. Entries must be non-empty strings; a bare string instead of an array is rejected rather than read as a one-item list.
Idempotency & safety. A role is identified by its (trimmed name, business unit) — the same
identity the platform uses. A rebuild reuses only a role the builder itself authored (marked as
SDK-authored); a same-name role someone else created — or a managed role — is a conflict the build
refuses (fail-closed), never adopting or mutating a role it does not own. Privileges converge
(replace semantics): a rebuild that drops a privilege removes it. App availability also converges —
flipping appAccess to false on a rebuild removes the app↔role association (the app stops
appearing for that persona), not just the injected privilege. teardown --apply deletes only the
builder-authored persona roles, scoped to the persona's business unit so a same-named role in another
business unit is never touched. Because roles are keyed by (name, BU), two apps that declare a persona
of the same name in the same business unit share one role by design (the second build reuses the
first's) — give personas distinct names, or a distinct businessUnitId, if you need separate roles. In
--changed-only mode a persona change forces a full build (there is no partial security apply yet).
Verification. verify-model-app proves the role row exists carrying the SDK ownership marker
(role) and — when the reader supplies role/entity privilege access — that the role actually
grants every declared privilege at at least the declared depth (role-privileges). The depth
comparison is a subset check by design: extra privileges are never a finding, because appAccess
injects appmodule read, unioned jobs escalate a shared entity+access to the max declared scope, and
distinct entities can share one Dataverse privilege (a role holds one depth per privilege). It fails
closed — an unreadable role, or a table whose privilege metadata cannot be read, is reported
rather than skipped.
Validation rules (validateAppSpec): persona required + unique; each job needs a name and a
non-empty privileges[]; access values and scope must be valid tokens; appAccess must be a
boolean; businessUnitId and assignTo ids must be GUIDs. Two apply-time checks need live metadata and
are not enforced at lint time (they surface as a clear build halt): whether an entity supports a
requested access, and the rule that different entities sharing one Dataverse privilege must request the
same scope.
Not yet supported (tracked follow-up): access teams / hierarchy security. The security surface
today is role-per-persona plus roleGrants[] (below) and, from 2.21.0, column-level security
(isSecured + fieldSecurityProfiles[], in the advanced reference).