Skip to content

microsoft/power-platform-skills / plugins/power-pages/skills/compare-site-configurations

compare-site-configurations

Unverified

Compare Power Pages site configurations between two environments, such as dev, test and production, or between a local download and the live site, and explain which differences change site behavior. Use when a site works in one environment but not another (for example, works in dev but fails in test), to check configuration drift before promoting or deploying, or to see what changed between two sites. Produces a shareable HTML report and a JSON file that VS Code can import.

references/remote-sites.md

View on GitHub
# Remote sites

Read this for each site the user gave as a website URL or a website record ID.

## Verify the website

- Check `pac --version` and `pac auth list`.
  Use the active profile as it is: `--environment` on each command reaches another environment without switching or creating a profile.
  When `pac auth list` shows no profile, ask the user to sign in to PAC and stop.
  Keep credentials and tokens out of files and chat.
- Resolve the Dataverse environment URL from the user's answer or an unambiguous authenticated context (`pac env who`, `pac env list`).
  A public website URL is not a Dataverse environment URL.
  When the environment stays unknown, ask for that site's Dataverse environment URL.
- Read the environment's **Environment ID** (a GUID) from its `pac env list` row, or from `pac env who`; the JSON export records it.
- Run `pac pages list --environment "<ENVIRONMENT_URL>" --verbose`.
  Match the website record ID against **Website Id**, or the exact website hostname against **Portal Url**.
  Use **Website Id**: a **Portal Id**, tenant ID or environment ID names something else.
  An inactive site can still be selected by its website record ID.
- From the matched row, read **Single Page Application** (`Yes` or `No`) and **Data Model Version** (`Standard` or `Enhanced`).
  When the row or either column is missing, ask the user rather than guess, and take GUIDs and environments only from PAC output or the user.
- Unrelated websites, or sites on different data models, differ in almost every record ID.
  Compare the files as they are, without remapping IDs, and tell the user to expect that noise.

**Verified** means: the website record ID, environment URL, environment ID and site type (SPA or non-SPA) are all known.

## Download

Download into `<RUN_DIR>/source` for the first site or `<RUN_DIR>/target` for the second.

Non-SPA site (**Single Page Application** is `No`), passing its **Data Model Version**:

```bash
pac pages download --path "<RUN_DIR>/<source-or-target>" --webSiteId "<WEBSITE_RECORD_ID>" --environment "<ENVIRONMENT_URL>" --modelVersion "<Standard-or-Enhanced>"
```

SPA site (`Yes`); this command takes no model version:

```bash
pac pages download-code-site --path "<RUN_DIR>/<source-or-target>" --webSiteId "<WEBSITE_RECORD_ID>" --environment "<ENVIRONMENT_URL>"
```

Pass `--environment` on every `pac pages` command, so the active profile and environment stay as they were.
Download the whole site, without `--includeEntities`, `--excludeEntities` or `--overwrite`.

PAC creates one site-named folder under `--path`.
A non-SPA download has `website.yml` directly in that folder; an SPA download has it in the folder's `.powerpages-site/` and has no `powerpages.config.json`.
Use that one site folder, and stop if `--path` holds more than one.

Reference: [PAC pages commands](https://learn.microsoft.com/power-platform/developer/cli/reference/pages)
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall