Dynamics Chronicles
Search

Migrate a Power Pages site to the enhanced data model with PAC CLI

Published
Author
Lloyd Sebag
Type
Chronicle
Folders travelling on a conveyor from a wall of small filing drawers into one large cabinet, next to a web page outline and a circular undo arrow.

Many Power Pages sites still run on the standard data model, the adx_ tables inherited from the Dynamics 365 portals. New sites have used the enhanced data model by default for a while, and Microsoft now documents a supported way to move existing ones: pac pages migrate-datamodel. Power Platform CLI 2.16.1, released on November 20, 2026, fixes several defects of that command, which makes it a good moment to plan the move. This article explains what the migration changes, how to run it across development, test and production, how to fix the customizations it does not carry over, and how to roll back.

Why migrate

The two models store the same site configuration in very different ways (Enhanced data model):

  • Standard data model: one custom Dataverse table per component type (adx_webpage, adx_webtemplate, adx_sitesetting, adx_entitypermission…). Site configuration moves between environments through configuration data, and package updates must be applied by an admin.
  • Enhanced data model: configuration is stored in a few system tables, mainly Site Component (powerpagecomponent), with each component's properties in a JSON content column and its kind in powerpagecomponenttype. Read-only virtual tables (mspp_webpage, mspp_webrole…) expose the components to the Power Pages Management app.

What you gain is mostly ALM. Enhanced data model sites are solution-aware: the site can travel in the same solution as its tables, model-driven app and flows, go through Pipelines in Power Platform, use environment variables for site settings that differ per environment, and sync with Git through Dataverse Git integration (in preview). Microsoft also states that new Power Pages features are built on the enhanced data model, and that updates and fixes reach those sites without manual package upgrades.

As of November 2026, Microsoft has not announced an end date for the standard data model. Existing sites keep running on adx_ tables until you migrate them, one site at a time.

What the migration does, and what it does not

The migration guide separates two families of adx_ tables:

  • Metadata tables that describe the site (adx_webpage, adx_webtemplate, adx_contentsnippet, adx_sitesetting, adx_pagetemplate, adx_weblink, adx_entityform, adx_entitylist…) are consolidated into powerpagecomponent.
  • Transactional tables that record runtime activity (adx_invitation, adx_inviteredemption, adx_portalcomment, adx_externalidentity, form submission and session tables…) stay where they are. Only their lookups are rewired to point at the new powerpagecomponent rows.

The utility then switches the site record so that the site is served from the enhanced model. What it does not do is rewrite your customizations. Custom columns on adx_ metadata tables, relationships to them, Liquid and FetchXML that read them, plug-ins and workflows registered on them: all of these keep pointing at tables the site no longer uses. The utility produces a report of them; fixing them is your job.

Prerequisites

From the migration guide:

  • Power Platform CLI 2.11.2 or later. Use 2.16.1 or later in practice: its release notes fix an HTTP 404 on --updateDataModelVersion after a completed migration, make step 2 resume the tracker of step 1 instead of step 1 marking the migration as completed, stop writing web file and server logic content to the powerpagecomponent.content column (which could exceed its size limit), and replace a 30-second connection timeout during uploads with a 5-minute one. pac pages list -v also shows the data model version of each site.
  • Packages: CDSBasePortal 9.3.2607.x or later and PowerPages_Core 1.0.2605.x or later, plus the enhanced data model solution of the site's template (for example PowerPages_BlankTemplate_V2 for the Blank page template).
  • Role: System Administrator, Dynamics 365 Administrator or Power Platform Administrator to switch or revert the data model.
  • Background operations enabled if the environment is in administration mode.
  • A supported template. The guide lists Starter layouts 1 to 5, Application processing, Blank page, Program registration, Schedule and manage meetings, FAQ, and the four Dynamics 365 portals (Community, Customer Self-Service, Employee Self-Service, Partner). If the site's original template is not in the list, do not run the utility.

Watch out for a contradiction: the older Enhanced data model page (July 2026) still says that sites created from the four Dynamics 365 portal templates cannot be migrated yet, while the migration guide (October 2026) lists them as supported. For those templates, rehearse on a copy of production before you commit to a date.

The four phases

The guide organizes the work in four phases. Phases 2 and 3 depend on the mode, which you choose per environment:

Environment Mode What happens
Development configurationData Migrate configuration, remediate customizations, capture the result in a solution.
Test, UAT, production configurationDataReferences Import the solution from development, then migrate only the references of transactional records.
Single environment, simple site all Both in one operation, without the solution path.

The key idea is that configuration is migrated once, in development, and then travels as a solution like any other component. Downstream environments only rewire their own transactional data.

Phase 1: pre-checks

Authenticate against the right environment and find the site:

pac --version
pac auth create -u "https://contoso-dev.crm.dynamics.com"
pac auth who
pac pages list -v

Note the website ID (used by every migrate-datamodel command) and the portal ID (used to switch or revert). The portal ID is not the Power Pages app ID; if the CLI does not show it, the admin center shows it under Resources > Power Pages sites > Site details.

Check that no migration is already running, list the packages, and generate the customization report. The report changes nothing:

$site = "00000000-0000-0000-0000-000000000000"

pac pages migrate-datamodel --webSiteId $site --checkMigrationStatus
pac solution list --includeSystemSolutions
pac pages migrate-datamodel --webSiteId $site --siteCustomizationReportPath "C:\Migration\contoso"

If the template's enhanced data model solution is missing, pac application install --application-name "<template package name>" installs it; when that fails, the guide suggests creating a temporary site from the same template, which installs the solution, and deleting the site afterwards.

Phase 2: configuration (development)

Take a baseline of the standard site first, then migrate the configuration:

pac pages download --webSiteId $site --modelVersion 1 --path "C:\Migration\contoso\site-sdm"
pac pages migrate-datamodel --webSiteId $site --mode configurationData
pac pages migrate-datamodel --webSiteId $site --checkMigrationStatus

The status goes through Running to Completed, Failed or Reverted. A large site can stay Running for a long time; the guide insists that you keep checking rather than start a second migration on the same site.

Then work through the report (next section), retest, and add the migrated site to a solution.

In test and production, import the solution produced in development first, then:

pac solution import --path ".\ContosoPortal_managed.zip" --activate-plugins true --publish-changes true
pac pages migrate-datamodel --webSiteId $site --mode configurationDataReferences
pac pages migrate-datamodel --webSiteId $site --checkMigrationStatus

When the status is Completed, switch the site and restart it from the Power Platform admin center (Resources > Power Pages sites > the site > Restart):

$portal = "00000000-0000-0000-0000-000000000000"
pac pages migrate-datamodel --webSiteId $site --updateDatamodelVersion --portalId $portal

The standard website record is deactivated and the enhanced one becomes active. The URL and the look of the site do not change, so do not use them as proof: check that the admin center shows Enhanced in the Data model field, or run pac pages list -v again.

Phase 4: validation

Test with real accounts for each web role, not with an admin: sign-in and registration, invitations, external identity providers, table and column permissions, forms and multistep forms, lists, web files, redirects, multilingual content, and the main journeys of the template. In the browser developer tools, a 401 or 403 on /_api usually means a permission problem, and a 500 a Liquid, FetchXML or plug-in failure.

Fixing customizations

The report is a CSV of direct dependencies on standard tables. The guide gives a remediation for each category:

  • Custom column on a metadata table (say, a custom field on adx_webpage): create a custom table for that data, with a lookup to powerpagecomponent, move the values, and update the code that reads them.
  • Relationship to a metadata table: recreate it against the enhanced table, usually powerpagecomponent, and update the forms, views, flows and integrations that use it.
  • Liquid reading entities['adx_…']: use a dedicated Liquid object where one exists, such as weblinks instead of querying adx_weblinkset. The returned attributes can differ, so test each template.
  • FetchXML on adx_ tables: query powerpagecomponent filtered on the component type, or the matching virtual table.
  • Plug-ins and workflows on adx_ tables: register them again on the enhanced tables and adapt them to the new schema.

The FetchXML change is the one you will repeat most. A web page lookup by partial URL becomes a query on powerpagecomponent with type 2 (web page):

<fetch>
  <entity name="powerpagecomponent">
    <attribute name="name" />
    <filter type="and">
      <condition attribute="powerpagecomponenttype" operator="eq" value="2" />
      <condition attribute="partialurl" operator="eq" value="home" />
    </filter>
  </entity>
</fetch>

The guide lists all the type values; the ones you meet most often are web file (3), web link set (4), content snippet (7), web template (8), site setting (9), web role (11), basic form (15), list (17) and table permission (18).

Remember that the report only finds direct dependencies. An external integration that reads adx_webpage through the Web API, or a Power BI report on adx_sitesetting, will not appear in it: search your integration code and reports for adx_ before the production date.

Rolling back

If validation finds a critical issue after activation:

pac pages migrate-datamodel --webSiteId $site --revertToStandardDataModel --portalId $portal

Restart the site, check that it shows Standard again, and rerun your critical tests. The standard and enhanced website records are separate, so anything changed on the enhanced site after the switch is not copied back. Decide in advance how long the rollback window is and who decides, and freeze content changes during that window.

A production plan in ten lines

  1. Copy production to a rehearsal environment.
  2. Check CLI, packages and the template solution there.
  3. Generate and review the customization report; assign an owner to each line.
  4. Migrate configuration in development and remediate.
  5. Capture the site in a managed solution.
  6. Import it in rehearsal, migrate references, activate, validate. Repeat until the critical tests pass.
  7. Plan a maintenance window and a rollback decision point; back up production.
  8. Check the production packages again and import the managed solution.
  9. Run configurationDataReferences, check the status, switch and restart.
  10. Validate before reopening the site to users.

Key takeaways

  • The migration moves site metadata into powerpagecomponent and rewires transactional records; your customizations on adx_ tables do not follow on their own.
  • Migrate configuration once, in development, then ship it as a solution; downstream environments only run configurationDataReferences.
  • Use Power Platform CLI 2.16.1 or later: it fixes defects in the switch step and in the step 1 / step 2 sequence.
  • The report covers Liquid, FetchXML, columns, relationships, plug-ins and workflows inside the environment, not external integrations or reports.
  • Rehearse on a copy of production, keep the rollback command and portal ID at hand, and check the data model in the admin center rather than on the site itself.

Researched and drafted with AI assistance, then reviewed, edited and published by a human.

Sources

  1. Migrate standard data model sites to enhanced data modellearn.microsoft.com
  2. Enhanced data modellearn.microsoft.com
  3. Microsoft.PowerApps.CLI (NuGet package, release notes)nuget.org