Power Platform 15 min read

The PAC CLI Bible: Power Platform Command Reference

The PAC CLI Bible: Power Platform Command Reference
A complete, parameter-level reference for the Microsoft Power Platform CLI (pac). Covers Dataverse, admin, Copilot Studio, and ALM with real-world examples.

A complete, parameter-level reference for the Microsoft Power Platform CLI (pac), with plain-language parameter explanations and multiple real-world examples per command. Covers Dataverse, Power Platform administration, Copilot Studio, Power Pages, code components, and ALM. Reflects CLI v2.8.1. Parameters drift between versions — pac <group> <command> --help is always authoritative for your installed version.

What is the PAC CLI?

PAC CLI Ecosystem

The Microsoft Power Platform CLI (pac) is Microsoft’s single, official command-line tool for developers and ISVs. It covers environment lifecycle, authentication, Dataverse, solutions/ALM, Power Pages, code components, and Copilot Studio.

Where each product fits:

ProductCLI coverage
Dataversepac data, pac env, pac solution, pac connection, pac plugin, pac model, pac managed-identity
Power Platform (admin)pac admin, pac auth, pac pipeline, pac connector, pac catalog, pac tool
Copilot Studiopac copilot
Power AutomateNo dedicated group — via pac solution, pac connection/pac connector, Build Tools, desktop Run URLs, or community CLIs (see Appendix A)

Key concepts

Before the commands, here are the core Power Platform building blocks the CLI works with.

Tenant — Your whole organization in Microsoft’s cloud (one Microsoft Entra / Azure AD directory). A tenant contains all your environments. pac auth logs you into a tenant; pac admin operates across it.

Environment — A container in Power Platform where your apps, flows, agents, and data actually live and run. You typically have several (Dev, Test, Prod); each has its own URL and usually its own Dataverse database. Think of it as a workspace in the cloud that you point commands at with --environment.

Dataverse — The underlying database/data platform behind it all. Environments store their tables and records in Dataverse, and most pac commands ultimately read/write there.

Solution — A package of customizations inside an environment — tables, apps, flows, agents, connectors, etc. — grouped so you can move them between environments as a unit (the way you promote work Dev → Test → Prod). Two flavors: unmanaged (editable, for Dev) and managed (locked, for Test/Prod).

Package — A bigger bundle that wraps multiple solutions together, plus optional reference data, an install order, and custom C# deployment logic. A solution moves one thing; a package orchestrates installing several solutions (and extras) in sequence — used for product/environment setup scenarios. Built with pac package.

Project — A folder on your local computer containing the source files for something you’re building, set up for editing and source control (Git). It’s the developer/offline representation, as opposed to the live thing in the environment. Examples: pac solution init → a solution project (.cdsproj); pac plugin init → a plug-in project; pac pcf init → a code-component project.

Project vs. solution — the key distinction: a project is what you edit on disk; a solution is what exists in the environment. You pack/push a project up into the environment, and unpack/clone an environment’s solution down into a project.

Project vs Solution Concept

Publisher (and prefix) — The identity that “owns” a solution’s components. It carries a short customization prefix (e.g. con_) stamped onto everything you create (con_order) so it never collides with other vendors’ components. That’s why pac solution init requires --publisher-prefix.

Component — A single customizable item inside a solution: a table, column, app, flow, agent, security role, web resource, etc. A solution is essentially a collection of components.

Connector vs Connection — A connector is the definition of how to talk to a service (the API + auth shape, e.g. the “SQL Server connector”). A connection is an actual authenticated instance of that connector with real credentials. One connector → many connections.

Connection reference & Environment variable — Indirection layers that make solutions portable. A connection reference lets a flow point at “whatever connection this environment provides” instead of a hard-coded one; an environment variable holds a value (URL, key, etc.) that differs per environment. You supply these per environment via a settings file at import time (pac solution import --settings-file).

Installation

MethodOSNotes
.NET toolWin/Linux/macOSdotnet tool install --global Microsoft.PowerApps.CLI.Tool. Does not enable pac data or pac package deploy/show.
VS Code extensionWin/Linux/macOSRuns in the VS Code terminal.
Windows MSIWindows onlyLets you manage installed versions.
Code
dotnet tool install   --global Microsoft.PowerApps.CLI.Tool
dotnet tool update    --global Microsoft.PowerApps.CLI.Tool
dotnet tool uninstall --global Microsoft.PowerApps.CLI.Tool
pac            # prints the version banner

Platform availability

These are Windows-only and unavailable on a .NET-tool install on macOS/Linux:

  • pac data (entire group)
  • pac package deploy, pac package show
  • pac tool (entire group — launches Windows desktop tools)

Everything else is cross-platform.

Authentication (do this first)

Every environment-scoped command needs an auth profile. Without one you get Error: No profiles were found on this computer.

Code
pac auth create                                              # interactive, default env
pac auth create --environment "https://yourorg.crm.dynamics.com"
pac auth create --deviceCode                                 # headless / SSH / WSL2 / Mac
pac auth create --name "Contoso-Dev" --environment "Contoso Dev"
pac auth who          # confirm who/where you are
pac auth list         # all profiles (Index column)
pac auth select --index 2
📌

Sovereign clouds (--cloud): GCC→UsGov, GCC High→UsGovHigh, DoD→UsGovDod, plus Public, China.

Self-discovery — the version-proof technique

Mock Developer Terminal

The CLI is self-documenting and always authoritative for your installed version:

Code
pac help                       # all command groups
pac <group> help               # sub-commands in a group
pac <group> <command> --help   # full parameter list for one command
💡

When this document and --help disagree, trust --help.

Global conventions

  • --environment / -env is on nearly every environment-scoped command. When omitted, the active auth profile’s selected org is used.
  • Every parameter has a long form and a short alias — e.g. --pipeline and -p are the same parameter, not two different ones.
  • Switches (e.g. --managed, --async, --overwrite) take no value — their presence sets them true.
  • --json is available on many read commands for machine-readable output.
  • (Preview) / (Deprecated) tags mark groups/commands that are not yet GA or are being retired.

Part 1 — pac auth (Authentication)

What this group is for: Before any pac command can touch an environment, you have to log in and save that login as an auth profile on your machine. You can store several profiles (Dev, Prod, per-customer) and switch between them.

Typical first-run flow:

Code
pac auth create            # 1. log in
pac auth who               # 2. confirm who/where you are
pac auth list              # 3. see all saved logins
pac auth select --index 2  # 4. switch to a different one

pac auth create — log in and save a profile

ParameterLong / shortRequired?What it’s for
Name--name / -nOptionalA friendly label (max 30 chars).
Environment--environment / -envOptionalWhich environment to connect to (ID, URL, unique/partial name).
Device code--deviceCode / -dcOptional (switch)Log in via a code pasted into a browser on any device — for headless/SSH/WSL2/Mac.
Application ID--applicationId / -idOptionalApp (client) ID for service-principal logins.
Client secret--clientSecret / -csOptionalSecret that pairs with the application ID.
Tenant--tenant / -tOptionalTenant (directory) ID — required with app ID + secret/cert.
Cloud--cloud / -ciOptionalPublic (default), UsGov, UsGovHigh, UsGovDod, China.
Managed identity--managedIdentity / -miOptional (switch)Log in using an Azure managed identity.
Certificate path / password--certificateDiskPath / -cdp, --certificatePassword / -cpOptionalCertificate-based service-principal auth.
Code
# Scenario 1 — simplest: browser sign-in to your default env
pac auth create

# Scenario 2 — connect straight to an environment by URL
pac auth create --environment https://contoso-dev.crm.dynamics.com

# Scenario 3 — connect by environment ID and name the profile
pac auth create --name "Contoso-Dev" --environment 00000000-0000-0000-0000-000000000000

# Scenario 4 — headless / browser won't open: device code
pac auth create --deviceCode

# Scenario 5 — unattended automation login with a service principal
pac auth create --name "Contoso-CI" \
  --applicationId 11111111-1111-1111-1111-111111111111 \
  --clientSecret  $CLIENT_SECRET \
  --tenant        22222222-2222-2222-2222-222222222222

pac auth who — confirm who/where you are

No parameters (accepts an optional --environment). Prints the active profile’s user and target environment.

Code
pac auth who
pac auth who --environment https://contoso-prod.crm.dynamics.com

pac auth list — see all saved profiles

No parameters. Lists every profile with an Index number; an asterisk marks the active one.

Code
pac auth list

pac auth select — switch the active profile

ParameterLong / shortRequired?What it’s for
Index--index / -iOptionalProfile number from pac auth list.
Name--name / -nOptionalProfile name (instead of the index).
Code
pac auth select --index 2
pac auth select --name "Contoso-Prod"

pac auth name — rename a profile

ParameterLong / shortRequired?What it’s for
Index--index / -iRequiredWhich profile to rename.
Name--name / -nRequiredThe new label (max 30 chars).
Code
pac auth name --index 1 --name "Contoso Dev"

pac auth update — repoint a profile (or rename it)

ParameterLong / shortRequired?What it’s for
Index--index / -iRequiredWhich profile to update.
Environment--environment / -envOptionalNew target environment.
Name--name / -nOptionalNew label.
Code
pac auth update --index 1 --environment https://contosodev.crm.dynamics.com
pac auth update --index 1 --name "Contoso Dev" --environment 00000000-0000-0000-0000-000000000000

pac auth delete — remove one profile

ParameterLong / shortRequired?What it’s for
Index--index / -iOptionalProfile number to delete.
Name--name / -nOptionalProfile name to delete.
Code
pac auth delete --index 2
pac auth delete --name "Contoso-Prod"

pac auth clear — wipe all profiles

No parameters. Removes every stored profile from the machine.

Code
pac auth clear

Part 2 — pac env

What this group is for: Once you’re logged in, pac env lets you see which environments you can reach, pick a default one for your active profile, query data with FetchXML, and read/update environment-level settings. (Formerly pac org — that spelling still works.)

pac env list — see the environments you can reach

ParameterLong / shortRequired?What it’s for
Filter--filter / -fOptionalA regex filter on environment name.
Code
pac env list
pac env list --filter dev
pac env list --filter "^Contoso"

pac env select — set the default environment

ParameterLong / shortRequired?What it’s for
Environment--environment / -envOptionalWhich environment to make default (ID, URL, unique/partial name).
Code
pac env select --environment https://contosotest.crm.dynamics.com
pac env select --environment 00000000-0000-0000-0000-000000000000
pac env select --environment "Contoso Test"

pac env who — show the current environment

ParameterLong / shortRequired?What it’s for
Environment--environment / -envOptionalCheck a specific environment instead of the active one.
JSON--jsonOptional (switch)Machine-readable output.
Code
pac env who
pac env who --environment https://contoso-prod.crm.dynamics.com
pac env who --json

pac env fetch — run a FetchXML query

ParameterLong / shortRequired?What it’s for
XML--xml / -xOptional*FetchXML query as an inline string.
XML file--xmlFile / -xfOptional*Path to a file containing the FetchXML.
Environment--environment / -envOptionalWhich environment to query.

*Supply one of --xml or --xmlFile.

Code
pac env fetch --xml "<fetch top='5'><entity name='account'><attribute name='name'/></entity></fetch>"
pac env fetch --xmlFile ./queries/active-contacts.xml
pac env fetch --xmlFile ./queries/active-contacts.xml --environment https://contoso-prod.crm.dynamics.com

pac env list-settings — read environment settings

ParameterLong / shortRequired?What it’s for
Filter--filter / -fOptionalShow only settings whose name contains this text.
Environment--environment / -envOptionalWhich environment to read.
Code
pac env list-settings
pac env list-settings --filter number
pac env list-settings --filter currency --environment https://contoso-prod.crm.dynamics.com

pac env update-settings — change an environment setting

ParameterLong / shortRequired?What it’s for
Name--name / -nRequiredThe exact setting name (from list-settings).
Value--value / -vOptionalThe new value.
Environment--environment / -envOptionalWhich environment to update.
Code
pac env update-settings --name showweeknumber --value true
pac env update-settings --name numberformat --value en
pac env update-settings --name showweeknumber --value true --environment https://contoso-test.crm.dynamics.com

Part 3 — pac solution (Solutions & ALM)

ALM Lifecycle Flowchart

What this group is for: Solutions package and move customizations between environments. Two models: environment ↔ environment (export/import) and environment ↔ source control (unpack/pack, automated by clone/sync). Unmanaged = editable, for Dev; Managed = locked, for Test/Prod.

The two common loops:

Code
# Quick promote: Dev → Prod
pac solution export --name MySolution --managed --path ./MySolution.zip
pac auth select --index 2
pac solution import --path ./MySolution.zip

# Source control round-trip
pac solution export --name MySolution --path ./MySolution.zip
pac solution unpack --zipfile ./MySolution.zip --folder ./src/MySolution
pac solution pack   --zipfile ./MySolution.zip --folder ./src/MySolution

pac solution init — start a new solution project

ParameterLong / shortRequired?What it’s for
Publisher name--publisher-name / -pnRequiredPublisher’s unique name (letters/digits/underscore; starts with letter/underscore).
Publisher prefix--publisher-prefix / -ppRequired2–8 char prefix stamped on components; starts with a letter, not mscrm.
Output directory--outputDirectory / -oOptionalWhere to create the project.
Code
pac solution init --publisher-name contoso --publisher-prefix con
pac solution init --publisher-name contoso --publisher-prefix con --outputDirectory ./solutions/Core

pac solution clone — pull an existing solution into a project

ParameterLong / shortRequired?What it’s for
Name--name / -nRequiredThe solution to pull down.
Include--include / -iOptionalExtra settings to bring along (comma-separated).
Package type--packagetype / -pOptionalUnmanaged, Managed, or Both (default Both).
Output directory--outputDirectory / -oOptionalWhere to create the project.
Async--async / -aOptional (switch)Run the export asynchronously.
Environment--environment / -envOptionalSource environment.
Code
pac solution clone --name ContosoCore
pac solution clone --name ContosoCore --include general,autonumbering
pac solution clone --name ContosoCore --packagetype Unmanaged --async --outputDirectory ./src/ContosoCore

pac solution sync — refresh your project from the environment

ParameterLong / shortRequired?What it’s for
Package type--packagetype / -pOptionalUnmanaged, Managed, or Both.
Async--async / -aOptional (switch)Run asynchronously.
Environment--environment / -envOptionalSource environment.

Confirm exact flags with pac solution sync --help on v2.8.1.

Code
pac solution sync
pac solution sync --packagetype Unmanaged

pac solution export — download a solution as a zip

ParameterLong / shortRequired?What it’s for
Name--name / -nRequiredThe solution to export.
Path--path / -pOptionalWhere to write the zip.
Managed--managed / -mOptional (switch)Export as managed (for Test/Prod).
Include--include / -iOptionalExtra settings to export (comma-separated).
Overwrite--overwrite / -owOptional (switch)Allow overwriting an existing zip.
Async--async / -aOptional (switch)Export asynchronously.
Max wait--max-async-wait-time / -wtOptionalMax minutes to wait (default 60).
Environment--environment / -envOptionalSource environment.
Code
pac solution export --name ContosoCore --path ./ContosoCore.zip
pac solution export --name ContosoCore --managed --path ./ContosoCore_managed.zip --overwrite
pac solution export --name ContosoCore --path ./ContosoCore.zip --async --environment https://contoso-dev.crm.dynamics.com

pac solution import — upload a solution zip

ParameterLong / shortRequired?What it’s for
Path--path / -pOptionalThe zip to import (assumes a .cdsproj if omitted).
Activate plug-ins--activate-plugins / -apOptional (switch)Turn on plug-ins/flows after import.
Force overwrite--force-overwrite / -fOptional (switch)Overwrite unmanaged customizations.
Publish changes--publish-changes / -pcOptional (switch)Publish right after import.
Import as holding--import-as-holding / -hOptional (switch)Stage a managed upgrade (pairs with upgrade).
Stage and upgrade--stage-and-upgrade / -upOptional (switch)Import and apply the upgrade in one step.
Skip lower version--skip-lower-version / -slvOptional (switch)Skip if same/higher version present.
Skip dependency check--skip-dependency-check / -sOptional (switch)Skip the product-update dependency check.
Settings file--settings-fileOptionalJSON of connection-reference + env-variable values.
Async--async / -aOptional (switch)Import asynchronously.
Max wait--max-async-wait-time / -wtOptionalMax minutes to wait (default 60).
Environment--environment / -envOptionalTarget environment.
Code
pac solution import --path ./ContosoCore_managed.zip
pac solution import --path ./ContosoCore_managed.zip --activate-plugins --publish-changes
pac solution import --path ./ContosoCore_managed.zip \
  --settings-file ./deploy/prod.settings.json --skip-lower-version --async \
  --environment https://contoso.crm.dynamics.com

pac solution pack — build editable files into a zip

ParameterLong / shortRequired?What it’s for
Zip file--zipfile / -zRequiredOutput zip path.
Folder--folder / -fOptionalSource folder to read from.
Package type--packagetype / -pOptionalUnmanaged (default), Managed, Both.
Localize--localize / -locOptional (switch)Merge translated strings from .resx.
Single component--singleComponent / -scOptionalWebResource, Plugin, Workflow, or None.
Map--map / -mOptionalMapping XML controlling what gets packed.
Error level--errorlevel / -eOptionalVerbose, Info (default), Warning, Error, Off.
(advanced)--allowDelete / -ad, --allowWrite / -aw, --clobber / -c, --log / -l, --useLcid / -lcidOptionalFine-grained file/logging control.

YAML source-control folder format requires CLI ≥ 2.4.1 (supported on 2.8.1).

Code
pac solution pack --zipfile ./ContosoCore.zip --folder ./src/ContosoCore
pac solution pack --zipfile ./ContosoCore_managed.zip --folder ./src/ContosoCore --packagetype Managed
pac solution pack --zipfile ./ContosoCore.zip --folder ./src/ContosoCore --localize

pac solution unpack — explode a zip into editable files

Shares pack’s full parameter set.

ParameterLong / shortRequired?What it’s for
Zip file--zipfile / -zRequiredThe zip to unpack.
Folder--folder / -fOptionalDestination folder.
Package type--packagetype / -pOptionalUnmanaged, Managed, Both.
(advanced flags)Optional--localize, --map, --singleComponent, --errorlevel, etc.
Code
pac solution unpack --zipfile ./ContosoCore.zip --folder ./src/ContosoCore
pac solution unpack --zipfile ./ContosoCore.zip --folder ./src/ContosoCore --packagetype Both

pac solution list — list solutions in the environment

ParameterLong / shortRequired?What it’s for
Include system--includeSystemSolutionsOptional (switch)Also show Microsoft/system solutions.
JSON--jsonOptional (switch)Machine-readable output.
Environment--environment / -envOptionalWhich environment.
Code
pac solution list
pac solution list --includeSystemSolutions --json

pac solution delete — remove a solution

ParameterLong / shortRequired?What it’s for
Solution name--solution-name / -snRequiredThe solution to delete.
Environment--environment / -envOptionalWhich environment.
Code
pac solution delete --solution-name ContosoCore
pac solution delete --solution-name ContosoCore --environment https://contoso-test.crm.dynamics.com

pac solution publish — publish all customizations

ParameterLong / shortRequired?What it’s for
Async--async / -aOptional (switch)Publish asynchronously.
Environment--environment / -envOptionalWhich environment.
Code
pac solution publish
pac solution publish --async --environment https://contoso-dev.crm.dynamics.com

pac solution version — bump the version number

ParameterLong / shortRequired?What it’s for
Build version--buildversion / -bvOptionalSets the build number (integer ≥ 0).
Revision version--revisionversion / -rvOptionalSets the revision number.
Solution name--solution-name / -snOptionalWhich solution.
Environment--environment / -envOptionalWhich environment.
Code
pac solution version --solution-name ContosoCore --buildversion 5
pac solution version --solution-name ContosoCore --buildversion 5 --revisionversion 2

pac solution online-version — read/set the version in Dataverse

ParameterLong / shortRequired?What it’s for
Solution name--solution-name / -snRequiredWhich solution.
Solution version--solution-version / -svOptionalVersion to set (omit to read current).
Environment--environment / -envOptionalWhich environment.
Code
pac solution online-version --solution-name ContosoCore
pac solution online-version --solution-name ContosoCore --solution-version 1.0.0.2

pac solution upgrade — apply a staged managed upgrade

ParameterLong / shortRequired?What it’s for
Solution name--solution-name / -snRequiredThe solution to upgrade.
Async--async / -aOptional (switch)Run asynchronously.
Environment--environment / -envOptionalWhich environment.
Code
pac solution upgrade --solution-name ContosoCore
pac solution upgrade --solution-name ContosoCore --async --environment https://contoso.crm.dynamics.com

pac solution check — run the solution checker

ParameterLong / shortRequired?What it’s for
Path--path / -pOptionalPath to solution file(s) (wildcards allowed).
Solution URL--solutionUrl / -uOptionalSAS URL to a solution.zip.
Geo--geo / -gOptionalChecker geo (UnitedStates, Europe, Asia, …).
Rule set--ruleSet / -rsOptionalSolution Checker (default), AppSource Certification, or a GUID.
Output directory--outputDirectory / -oOptionalWhere to write results.
Save results--saveResults / -savOptional (switch)Store results in Solution Health Hub.
Environment--environment / -envOptionalWhich environment.
Code
pac solution check --path ./ContosoCore.zip --outputDirectory ./checker-results --geo UnitedStates
pac solution check --path ./ContosoCore.zip --ruleSet "AppSource Certification" --geo Europe
pac solution check --path ./ContosoCore.zip --saveResults --environment https://contoso-dev.crm.dynamics.com

pac solution create-settings — generate a deployment settings file

ParameterLong / shortRequired?What it’s for
Solution zip--solution-zip / -zOptional*Read from a solution zip.
Solution folder--solution-folder / -fOptional*Read from an unpacked folder.
Settings file--settings-file / -sOptionalOutput JSON path.
Code
pac solution create-settings --solution-zip ./ContosoCore.zip --settings-file ./deploy/dev.settings.json
pac solution create-settings --solution-folder ./src/ContosoCore --settings-file ./deploy/prod.settings.json
ParameterLong / shortRequired?What it’s for
Path--path / -pRequiredPath to the project being referenced.
Code
pac solution add-reference --path ../controls/MyControl
pac solution add-reference --path ../plugins/ContosoPlugins

pac solution add-solution-component — add a component

ParameterLong / shortRequired?What it’s for
Component--component / -cRequiredComponent schema name or ID.
Component type--componentType / -ctRequiredNumeric type code (e.g. 1 = table).
Solution unique name--solutionUniqueName / -snRequiredThe target solution.
Add required--AddRequiredComponents / -arcOptional (switch)Also add dependencies.
Environment--environment / -envOptionalWhich environment.
Code
pac solution add-solution-component --solutionUniqueName ContosoCore --component contact --componentType 1
pac solution add-solution-component --solutionUniqueName ContosoCore --component account --componentType 1 --AddRequiredComponents

pac solution add-license — attach ISV licensing info

ParameterLong / shortRequired?What it’s for
Plan definition file--planDefinitionFile / -pdRequiredPlan definition CSV.
Plan mapping file--planMappingFile / -pmRequiredPlan-to-component mapping CSV.
Code
pac solution add-license --planDefinitionFile ./ISV_Plan_Definition.csv --planMappingFile ./ISV_Plan_Mapping.csv

Part 4 — pac package (Package Deployer projects)

What this group is for: Bundles several solutions plus reference data, custom C# deployment logic, and an install order into one deployable Package Deployer package.

⚠️

pac package deploy and pac package show are Windows-only.

pac package init — scaffold a package project

ParameterLong / shortRequired?What it’s for
Output directory--outputDirectory / -oOptionalWhere to create the project.
Package name--package-nameOptionalDefault package name.
Package type--package-type / -ptOptionaldataverse (default) or erp.
Publisher--publisher / -pubOptionalPublisher (default Microsoft).
Model--model / -mOptionalX++ model name(s) — required when erp.
Layer--layer / -lOptionalX++ layer (USR…ISV, default ISV).
Source root--source-root / -srOptionalSource root (default ./src).
Code
pac package init --outputDirectory ./ContosoPackage
pac package init --outputDirectory ./ContosoPackage --package-name ContosoSetup --publisher Contoso
pac package init --outputDirectory ./FnOPackage --package-type erp --model ContosoModel

pac package add-solution — add a solution to the package

ParameterLong / shortRequired?What it’s for
Path--path / -pRequiredPath to the solution .zip.
Import order--import-orderOptionalInstall sequence (lower/negative = earlier).
Import mode--import-modeOptionalsync or async.
Skip validation--skip-validation / -svOptional (switch)Add even if missing/invalid.
Missing-dependency behavior--missing-dependency-behaviorOptionalskip or fault.
Overwrite unmanaged--overwrite-unmanaged-customizationsOptionaltrue/false.
Publish + activate--publish-workflows-activate-pluginsOptionaltrue/false.
Dependency overrides--dependency-overridesOptionaluniquename:minVersion:maxVersion;….
Code
pac package add-solution --path ./Core.zip
pac package add-solution --path ./Reports.zip --import-order 2
pac package add-solution --path ./Automation.zip --import-mode async --publish-workflows-activate-plugins true

pac package add-reference — reference a solution project

ParameterLong / shortRequired?What it’s for
Path--path / -pRequiredPath to the referenced solution project.
(import/dependency flags)same as add-solutionOptional--import-order, --import-mode, --dependency-overrides, etc.
Code
pac package add-reference --path ../ContosoCore
pac package add-reference --path ../ContosoReports --import-order 3

pac package add-external-package — add a non-Dataverse package

ParameterLong / shortRequired?What it’s for
Package type--package-type / -tRequirede.g. xpp for F&O packages.
Path--path / -pRequiredPath to the external package.
Import order--import-orderOptionalInstall sequence.
Skip validation--skip-validation / -svOptional (switch)Add even if missing/invalid.
Code
pac package add-external-package --package-type xpp --path ./fno/ContosoFnO.zip
pac package add-external-package --package-type xpp --path ./fno/ContosoFnO.zip --import-order 1

pac package deploy (Windows-only) — deploy the package

ParameterLong / shortRequired?What it’s for
Package--package / -pOptionalBuilt package .dll/.zip.
Package type--package-type / -ptOptionaldataverse (default) or erp.
Solution--solution / -szOptionalA single solution ZIP/CAB instead of a package.
Settings--settings / -sOptionalRuntime settings key=value|key=value.
Log to console--logConsole / -cOptional (switch)Stream the log.
Log file--logFile / -lfOptionalWrite the log to a file.
Environment--environment / -envOptionalTarget environment.
(ERP flags)--db-sync / -ds, --build-type / -bt, --release-type / -rt, --modules / -mOptionalDatabase-sync/build controls.
Code
pac package deploy --package ./bin/Debug/ContosoPackage.dll --logConsole
pac package deploy --package ./bin/Debug/ContosoPackage.dll --settings "Region=EU|EnableFeatureX=true" --environment https://contoso.crm.dynamics.com
pac package deploy --package ./bin/Debug/ContosoPackage.dll --logFile ./deploy.log

pac package show (Windows-only) — inspect a built package

ParameterLong / shortRequired?What it’s for
Package--package / -pRequiredPackage .dll/.zip to inspect.
Log file--logFile / -lfOptionalWrite details to a file.
Verbose--verbose / -vdbgOptional (switch)Detailed diagnostics.
Environment--environment / -envOptionalTarget environment context.
Code
pac package show --package ./bin/Debug/ContosoPackage.dll
pac package show --package ./bin/Debug/ContosoPackage.dll --verbose --logFile ./inspect.log

Part 5 — pac pipeline

What this group is for: Pipelines push a solution through stages (Dev → Test → Prod) inside the product, without manual export/import.

pac pipeline list — see pipelines and their stages

ParameterLong / shortRequired?What it’s for
Pipeline--pipeline / -pOptionalName/ID of one pipeline to drill into (shows stages + stage IDs). Omit for all pipelines.
Environment--environment / -envOptionalWhich environment to look in.
Code
pac pipeline list
pac pipeline list --pipeline "Contoso Release Pipeline"
pac pipeline list -p "Contoso Release Pipeline" -env https://contoso-host.crm.dynamics.com

pac pipeline deploy — run a deployment

ParameterLong / shortRequired?What it’s for
Stage ID--stageId / -sidRequiredThe stage you’re deploying to (from list --pipeline).
Solution name--solutionName / -snRequiredUnique name of the solution being moved.
Current version--currentVersion / -cvRequiredThe solution’s current version.
New version--newVersion / -nvRequiredVersion to stamp on the deployed solution.
Wait--wait / -wOptional (switch)Block until the deploy finishes.
Environment--environment / -envOptionalThe environment hosting the pipeline.
Code
pac pipeline deploy \
  --stageId 1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d \
  --solutionName ContosoCoreSolution \
  --currentVersion 1.0.0.0 --newVersion 1.0.0.1 --wait

Part 6 — pac data (Configuration data & bulk delete)

⚠️

Windows-only. Run from a Windows machine or CI agent.

What this group is for: Move small configuration/reference data between environments (export/import, via the Configuration Migration tool), and manage bulk-delete jobs and retention policies.

Code
pac data export --schemaFile ./schema.xml --dataFile ./data.zip
pac auth select --index 2
pac data import --data ./data.zip

pac data export — export configuration data

ParameterLong / shortRequired?What it’s for
Schema file--schemaFile / -sfRequiredSchema XML (made with the Configuration Migration tool).
Data file--dataFile / -dfOptionalOutput zip (default data.zip).
Overwrite--overwrite / -oOptional (switch)Allow overwriting the output zip.
Verbose--verbose / -vOptional (switch)Detailed progress.
Environment--environment / -envOptionalSource environment.
Code
pac data export --schemaFile ./schema.xml
pac data export --schemaFile ./schema.xml --dataFile ./config-data.zip --overwrite
pac data export --schemaFile ./schema.xml --dataFile ./config-data.zip --verbose --environment https://contoso-dev.crm.dynamics.com

pac data import — import configuration data

ParameterLong / shortRequired?What it’s for
Data--data / -dRequiredThe zip/directory to import.
Environment--environment / -envOptionalTarget environment.

Confirm extra flags with pac data import --help.

Code
pac data import --data ./config-data.zip
pac data import --data ./config-data.zip --environment https://contoso-test.crm.dynamics.com

pac data bulk-delete schedule — schedule a bulk-delete job

ParameterLong / shortRequired?What it’s for
Entity--entity / -eRequiredTable logical name (e.g. account).
FetchXML--fetchxml / -fxOptionalFilter selecting records (without it, all rows are targeted).
Job name--job-name / -jnOptionalFriendly job name.
Recurrence--recurrence / -rOptionale.g. FREQ=DAILY;INTERVAL=1.
Start time--start-time / -stOptionalISO 8601 start (default now).
Environment--environment / -envOptionalWhich environment.
Code
pac data bulk-delete schedule --entity activitypointer --fetchxml ./queries/completed-activities.xml --job-name "Cleanup completed activities"
pac data bulk-delete schedule --entity account --fetchxml ./queries/stale-accounts.xml --job-name "Daily cleanup" --recurrence "FREQ=DAILY;INTERVAL=1" --start-time 2026-07-01T02:00:00Z
pac data bulk-delete schedule --entity contoso_tempimport --job-name "Purge temp import"
⚠️

No filter on the schedule means all rows are targeted.

pac data bulk-delete list / show / pause / resume / cancel

list takes no required params; the other four take --id / -id (required, the job GUID). All accept --environment / -env.

Code
pac data bulk-delete list
pac data bulk-delete show   --id 00000000-0000-0000-0000-000000000000
pac data bulk-delete pause  --id 00000000-0000-0000-0000-000000000000
pac data bulk-delete resume --id 00000000-0000-0000-0000-000000000000
pac data bulk-delete cancel --id 00000000-0000-0000-0000-000000000000

pac data retention … — retention policies

Five sub-commands — enable-entity, set, list, show, status — all accepting --environment / -env. Table/policy-specific flags vary; confirm with pac data retention <command> --help.

Code
pac data retention list
pac data retention enable-entity --environment https://contoso-prod.crm.dynamics.com
pac data retention status --environment https://contoso-prod.crm.dynamics.com

Part 7 — pac connection (Dataverse connections)

What this group is for: Manage connections stored inside an environment — the credentials (typically service-principal app ID + secret + tenant) that automation/components use to talk to Dataverse. (Distinct from pac auth, which is your CLI login.)

pac connection create

ParameterLong / shortRequired?What it’s for
Name--name / -nRequiredConnection label.
Application ID--application-id / -aRequiredService-principal app (client) ID.
Client secret--client-secret / -csRequiredSecret paired with the app ID.
Tenant ID--tenant-id / -tRequiredDirectory (tenant) ID.
Environment--environment / -envOptionalWhich environment.
Code
pac connection create --name "Contoso Automation" \
  --application-id 11111111-1111-1111-1111-111111111111 \
  --client-secret  $CLIENT_SECRET \
  --tenant-id      22222222-2222-2222-2222-222222222222

pac connection list

ParameterLong / shortRequired?What it’s for
Environment--environment / -envOptionalWhich environment to list.
Code
pac connection list
pac connection list --environment https://contoso-prod.crm.dynamics.com

pac connection update

ParameterLong / shortRequired?What it’s for
Connection ID--connection-id / -idRequiredWhich connection (GUID from list).
Application ID--application-id / -aRequiredThe (new) app ID.
Client secret--client-secret / -csRequiredThe (new) secret — this is how you rotate it.
Tenant ID--tenant-id / -tRequiredTenant ID.
Environment--environment / -envOptionalWhich environment.
Code
pac connection update --connection-id 33333333-3333-3333-3333-333333333333 \
  --application-id 11111111-1111-1111-1111-111111111111 \
  --client-secret  $NEW_CLIENT_SECRET \
  --tenant-id      22222222-2222-2222-2222-222222222222

pac connection delete

ParameterLong / shortRequired?What it’s for
Connection ID--connection-id / -idRequiredWhich connection to delete.
Environment--environment / -envOptionalWhich environment.
Code
pac connection delete --connection-id 33333333-3333-3333-3333-333333333333

Part 8 — pac plugin (Dataverse plug-in class libraries)

What this group is for: Scaffold and deploy plug-ins — custom C# code that runs inside Dataverse on events.

pac plugin init

ParameterLong / shortRequired?What it’s for
Output directory--outputDirectory / -oOptionalWhere to create the project.
Author--author / -aOptionalAuthor(s) in the package metadata.
Signing key path--signing-key-file-path / -skOptionalExisting signing key for the strong name.
Skip signing--skip-signing / -ssOptional (switch)Don’t sign the assembly (default is to sign).
Code
pac plugin init
pac plugin init --outputDirectory ./plugins/ContosoPlugins --author "Contoso Dev Team"
pac plugin init --skip-signing

pac plugin push

ParameterLong / shortRequired?What it’s for
Plugin ID--pluginId / -idRequiredThe plug-in assembly/package ID.
Plugin file--pluginFile / -pfOptionalThe built file to push.
Type--type / -tOptionalNuget (package, default) or Assembly (single .dll).
Configuration--configuration / -cOptionalBuild configuration (default Debug).
Environment--environment / -envOptionalTarget environment.
Code
pac plugin push --pluginId 44444444-4444-4444-4444-444444444444
pac plugin push --pluginId 44444444-4444-4444-4444-444444444444 --pluginFile ./bin/Release/ContosoPlugins.dll --type Assembly
pac plugin push --pluginId 44444444-4444-4444-4444-444444444444 --configuration Release --environment https://contoso-dev.crm.dynamics.com

Part 9 — pac model (Model-driven apps & generated pages)

What this group is for: Create model-driven apps and list apps/tables/languages, plus a genpage sub-group for code-first custom pages.

pac model create

ParameterLong / shortRequired?What it’s for
Name--name / -nRequiredDisplay name.
Description--description / -dOptionalApp description.
Solution--solutionOptionalSolution to add to (default Default).
Publish--publishOptional (switch)Publish immediately.
Environment--environment / -envOptionalWhich environment.
Code
pac model create --name "Contoso Service Hub"
pac model create --name "Contoso Service Hub" --description "Customer service workspace" --solution ContosoCore
pac model create --name "Contoso Service Hub" --solution ContosoCore --publish

pac model list / list-tables / list-languages

CommandKey parameters
pac model list--environment / -env
pac model list-tables--search / -s, --type / -t (custom/standard/all), --environment / -env
pac model list-languages--environment / -env
Code
pac model list
pac model list-tables --type custom
pac model list-tables --search account,contact,contoso_order
pac model list-languages

pac model genpage — code-first custom pages

CommandPurposeKey parameters
genpage listList generated pages in an app.--app-id (req), --environment
genpage generate-typesGenerate TypeScript types for data sources.--data-sources (req), --output-file / -o, --environment
genpage transpileCompile/test a page’s TS locally.--code-file (req), --data-sources, --output-file, --environment
genpage uploadUpload & publish a page.--app-id (req), --code-file (req), --page-id, --name / -n, --add-to-sitemap, --data-sources, --environment
genpage downloadPull pages from an app.--app-id (req), --page-id, --output-directory / -o, --environment
Code
pac model genpage generate-types --data-sources account,lead,contact
pac model genpage transpile --code-file ./src/pages/OrderSummary.ts --data-sources contoso_order
pac model genpage upload --app-id 55555555-5555-5555-5555-555555555555 --code-file ./src/pages/OrderSummary.ts --name "Order Summary" --add-to-sitemap
pac model genpage download --app-id 55555555-5555-5555-5555-555555555555 --output-directory ./src/pages

Part 10 — pac managed-identity (Preview)

What this group is for: Let Dataverse components authenticate to Azure without stored secrets, via an Azure Managed Identity + Federated Identity Credential (FIC).

Shared parameters (on almost every command): --component-id / -id (required, GUID), --component-type / -t (required, e.g. ServiceEndpoint/PluginAssembly/CopilotStudio), --environment / -env (optional).

CommandExtra parameters
create--application-id / -aid (req), --tenant-id / -tid (req)
get(shared only)
update--application-id / -aid, --tenant-id / -tid
delete--confirm / -y (switch)
configure-fic / show-fic / verify-fic--version / -v
upgrade-version--target-version, --revert-version (switch), --skip-fic-configuration (switch), --confirm / -y (switch)
Code
pac managed-identity create --component-id 77777777-7777-7777-7777-777777777777 --component-type ServiceEndpoint \
  --application-id 11111111-1111-1111-1111-111111111111 --tenant-id 22222222-2222-2222-2222-222222222222
pac managed-identity configure-fic --component-id 77777777-7777-7777-7777-777777777777 --component-type ServiceEndpoint
pac managed-identity verify-fic   --component-id 77777777-7777-7777-7777-777777777777 --component-type ServiceEndpoint
pac managed-identity upgrade-version --component-id 77777777-7777-7777-7777-777777777777 --component-type ServiceEndpoint --target-version 2 --confirm
pac managed-identity delete --component-id 77777777-7777-7777-7777-777777777777 --component-type ServiceEndpoint --confirm

Part 11 — pac copilot (Copilot Studio agents)

Copilot Agent Workflow

What this group is for: The full command-line lifecycle for Copilot Studio agents — create, sync to local files for source control, package into solutions, publish, deploy through environments, localize, and call AI Builder models.

Two ways to work with agents

ModelWhat it isCommands
Workspace (code-first / Git)Agent lives as a folder of files you edit locally and sync with the studio.init, clone, pull, push, pack
Template (YAML)Extract an agent to a reusable YAML template, then stamp out new agents.extract-template, create

Everything else (publish, status, list, delete, quarantine, translations, MCP, AI models) supports both.

Workspace lifecycle

pac copilot init — scaffold a new agent workspace

ParameterLong / shortRequired?What it’s for
Name--name / -nRequiredAgent display name.
Publisher prefix--publisher-prefix / -ppRequiredSolution publisher prefix.
Instructions--instructions / -insOptionalAgent system instructions.
Schema name--schema-name / -snOptionalOverride the derived schema name ({prefix}_{name}).
Project directory--project-dir / -pdOptionalWhere to create the workspace.
Template--template / -tOptionaldefault or minimal.
Environment--environment / -envOptionalTarget environment.
Code
pac copilot init --name "Contoso Helpdesk" --publisher-prefix con
pac copilot init --name "Contoso Helpdesk" --publisher-prefix con --template minimal --project-dir ./agents/helpdesk
pac copilot init --name "Contoso Helpdesk" --publisher-prefix con --instructions "You are a friendly IT helpdesk agent."
pac copilot init --name "Contoso Helpdesk" --publisher-prefix con --schema-name con_helpdeskbot --environment https://contoso-dev.crm.dynamics.com

pac copilot clone — pull an existing agent into a workspace

ParameterLong / shortRequired?What it’s for
Bot--bot / -idRequiredThe agent’s ID or schema name.
Component collection--component-collection / -ccOptionalSpecific collection ID (repeatable).
Display name--display-name / -dnOptionalDisplay name for the output folder.
Output directory--output-dir / -odOptionalRoot folder for the clone.
Environment--environment / -envOptionalSource environment.
Code
pac copilot clone --bot con_contosohelpdesk
pac copilot clone --bot 9ee3f7aa-ab79-4cf6-a726-d85c8c18cc3e --output-dir ./agents/helpdesk
pac copilot clone --bot con_contosohelpdesk --display-name "Helpdesk Agent" --environment https://contoso-dev.crm.dynamics.com

pac copilot pull / push — sync workspace ⇄ studio Both take --project-dir / -pd (optional; defaults to current folder). pull brings remote changes down; push sends local edits up.

Code
pac copilot pull
pac copilot pull --project-dir ./agents/helpdesk
pac copilot push
pac copilot push --project-dir ./agents/helpdesk

pac copilot pack — bundle the workspace into a solution zip

ParameterLong / shortRequired?What it’s for
Publisher prefix--publisher-prefix / -ppRequiredSolution publisher prefix.
Project directory--project-dir / -pdOptionalWorkspace to package.
Output path--output-path / -opOptionalWhere to write the solution zip.
Solution name--solution-name / -snOptionalSolution unique name (derived if omitted).
Code
pac copilot pack --publisher-prefix con
pac copilot pack --publisher-prefix con --project-dir ./agents/helpdesk --output-path ./dist/Helpdesk.zip
pac copilot pack --publisher-prefix con --solution-name ContosoHelpdeskAgent --output-path ./dist/Helpdesk.zip

Deploy & manage

pac copilot publish

ParameterLong / shortRequired?What it’s for
Bot--bot / -idRequiredThe agent’s ID or schema name.
Environment--environment / -envOptionalWhich environment.
Code
pac copilot publish --bot con_contosohelpdesk
pac copilot publish --bot 9ee3f7aa-ab79-4cf6-a726-d85c8c18cc3e --environment https://contoso-prod.crm.dynamics.com

pac copilot status

ParameterLong / shortRequired?What it’s for
Bot ID--bot-id / -idRequiredThe agent (chatbot) ID.
Environment--environment / -envOptionalWhich environment.
Code
pac copilot status --bot-id 9ee3f7aa-ab79-4cf6-a726-d85c8c18cc3e

pac copilot list

ParameterLong / shortRequired?What it’s for
Environment--environment / -envOptionalWhich environment.
Code
pac copilot list
pac copilot list --environment https://contoso-dev.crm.dynamics.com

pac copilot delete

ParameterLong / shortRequired?What it’s for
Bot--bot / -idRequiredThe agent’s ID or schema name.
Confirm--confirm / -yOptional (switch)Delete without prompting.
Environment--environment / -envOptionalWhich environment.
Code
pac copilot delete --bot con_contosohelpdesk
pac copilot delete --bot con_contosohelpdesk --confirm

pac copilot quarantine

ParameterLong / shortRequired?What it’s for
Bot ID--bot-id / -idRequiredThe agent to quarantine/unquarantine.
Status--status / -sOptional (switch)true = quarantine (default), false = release.
Environment--environment / -envOptionalWhich environment.
Code
pac copilot quarantine --bot-id 9ee3f7aa-ab79-4cf6-a726-d85c8c18cc3e --status true
pac copilot quarantine --bot-id 9ee3f7aa-ab79-4cf6-a726-d85c8c18cc3e --status false

Templates (YAML model)

pac copilot extract-template

ParameterLong / shortRequired?What it’s for
Bot--bot / -idRequiredSource agent ID or schema name.
Template file name--templateFileNameRequiredOutput YAML path.
Template name--templateNameOptionalTemplate name (default kickStartTemplate).
Template version--templateVersionOptionalX.X.X (default 1.0.0).
Overwrite--overwrite / -oOptional (switch)Allow overwrite.
Environment--environment / -envOptionalSource environment.
Code
pac copilot extract-template --bot 9ee3f7aa-ab79-4cf6-a726-d85c8c18cc3e --templateFileName ./templates/Helpdesk.yaml
pac copilot extract-template --bot con_contosohelpdesk --templateFileName ./templates/Helpdesk.yaml --templateName "ContosoHelpdeskTemplate" --templateVersion 2.1.0 --overwrite

pac copilot create

ParameterLong / shortRequired?What it’s for
Display name--displayNameRequiredNew agent display name.
Schema name--schemaNameRequiredNew agent schema (unique) name.
Solution--solution / -sRequiredSolution to create it in.
Template file name--templateFileNameRequiredSource YAML template.
Environment--environment / -envOptionalTarget environment.
Code
pac copilot create --displayName "Contoso Helpdesk EU" --schemaName con_helpdeskeu --solution ContosoCore --templateFileName ./templates/Helpdesk.yaml

Localization

pac copilot extract-translation

ParameterLong / shortRequired?What it’s for
Bot--bot / -idOptionalThe agent to extract from.
All--all / -aOptional (switch)All supported languages (default primary only).
Format--formatOptionalresx (default) or json.
Output dir--outdirOptionalWhere to write the files.
Source dir--sourcedir / -srcOptionalRead from a local solution folder.
Overwrite--overwrite / -oOptional (switch)Allow overwrite.
Environment--environment / -envOptionalSource environment.
Code
pac copilot extract-translation --bot con_contosohelpdesk --outdir ./loc
pac copilot extract-translation --bot con_contosohelpdesk --all --format json --outdir ./loc

pac copilot merge-translation

ParameterLong / shortRequired?What it’s for
File--file / -fOptionalTranslation file(s) (glob supported).
Solution--solution / -sOptionalSolution to merge into.
Source dir--sourcedir / -srcOptionalUse a local solution folder.
What-if--whatifOptional (switch)Preview without changing anything.
Verbose--verboseOptional (switch)More diagnostics.
Environment--environment / -envOptionalTarget environment.
Code
pac copilot merge-translation --file "./loc/*.resx" --solution ContosoCore
pac copilot merge-translation --file "./loc/*.json" --solution ContosoCore --whatif

Developer tooling & AI models

CommandPurposeKey parameters
pac copilot init-skillsExtract skill definition files.--output / -o (default .github/skills), --skills / -s
pac copilot mcpLocal MCP server info / run.--run / -r (switch)
pac copilot model listList AI Builder models.--environment / -env
pac copilot model predictSend text/prompt to a model.--model-id / -id, --model-name / -n, --prompt / -p, --text / -t, --environment
pac copilot model prepare-fetchPrep LLM FetchXML for execution.--inputFile / -i (req), --outputFile / -o (req), --environment
Code
pac copilot init-skills --skills admin,auth --output ./.github/skills
pac copilot mcp --run
pac copilot model list
pac copilot model predict --model-name "Contoso Sentiment" --prompt "How do customers feel about the new pricing?"
pac copilot model prepare-fetch --inputFile ./llm-output.xml --outputFile ./ready.xml

End-to-end recipes

New agent → source control → Prod:

Code
pac copilot init --name "Contoso Helpdesk" --publisher-prefix con --project-dir ./agents/helpdesk
git init ./agents/helpdesk && git add . && git commit -m "Initial agent"
pac copilot push
pac copilot publish --bot con_contosohelpdesk
pac copilot pack --publisher-prefix con --output-path ./dist/Helpdesk.zip
pac auth select --name "Contoso-Prod"
pac solution import --path ./dist/Helpdesk.zip --publish-changes
pac copilot publish --bot con_contosohelpdesk

Bring an existing studio agent under source control:

Code
pac copilot list
pac copilot clone --bot con_contosohelpdesk --output-dir ./agents/helpdesk
cd ./agents/helpdesk && git init && git add . && git commit -m "Import existing agent"

Localize into French and German:

Code
pac copilot extract-translation --bot con_contosohelpdesk --all --format resx --outdir ./loc
pac copilot merge-translation --file "./loc/*.resx" --solution ContosoCore --whatif
pac copilot merge-translation --file "./loc/*.resx" --solution ContosoCore
pac copilot publish --bot con_contosohelpdesk

Emergency offline + restore:

Code
pac copilot quarantine --bot-id <id> --status true
pac copilot quarantine --bot-id <id> --status false

Part 12 — pac canvas (Power Apps .msapp files)

What this group is for: Work with canvas apps at the file level. A canvas app is stored as a single binary .msapp. This group downloads/lists apps, generates an app from a connector, and (Preview) unpacks/packs an .msapp into source files for Git.

pac canvas list

ParameterLong / shortRequired?What it’s for
Environment--environment / -envOptionalWhich environment.
Code
pac canvas list
pac canvas list --environment https://contoso-dev.crm.dynamics.com

pac canvas download

ParameterLong / shortRequired?What it’s for
Name--name / -nRequiredApp exact/partial name or App ID.
File name--file-name / -fOptionalOutput file (default <appname>.msapp).
Extract to directory--extract-to-directory / -dOptionalExtract sources into this folder instead.
Overwrite--overwrite / -oOptional (switch)Allow overwrite.
Environment--environment / -envOptionalSource environment.
Code
pac canvas download --name "Contoso Inspections"
pac canvas download --name 12345678-90ab-cdef-1234-567890abcdef --file-name ./apps/Inspections.msapp --overwrite
pac canvas download --name "Contoso Inspections" --extract-to-directory ./src/inspections

pac canvas create

ParameterLong / shortRequired?What it’s for
Msapp--msappRequiredPath of the .msapp to generate.
Connector display name--connector-display-nameOptional*Connector to build from, by display name.
Connector ID--connector-idOptional*Connector to build from, by ID.
Environment--environmentOptionalThe connector’s environment.

*Provide one of the two connector flags.

Code
pac canvas create --msapp ./apps/OrdersApp.msapp --connector-display-name "Contoso Orders API"
pac canvas create --msapp ./apps/OrdersApp.msapp --connector-id shared_contoso-5forders --environment https://contoso-dev.crm.dynamics.com

pac canvas unpack (Preview) / pac canvas pack (Preview)

ParameterLong / shortRequired?What it’s for
Msapp--msappRequiredThe .msapp file (input for unpack, output for pack).
Sources--sourcesunpack: optional / pack: requiredSource folder (output of unpack, input to pack).
Layout--layoutOptionalSourceCode (recommended) or Experimental (deprecated).
Overwrite--overwriteOptional (switch)Allow overwrite.
Disable load from YAML--disable-load-from-yamlOptional (switch, pack only)Don’t load from *.pa.yaml (SourceCode layout).
Code
pac canvas unpack --msapp ./apps/Inspections.msapp --sources ./src/inspections --layout SourceCode --overwrite
pac canvas pack   --msapp ./apps/Inspections.msapp --sources ./src/inspections --layout SourceCode --overwrite

Round-trip recipe (version-control a canvas app):

Code
pac canvas download --name "Contoso Inspections" --file-name ./Inspections.msapp --overwrite
pac canvas unpack   --msapp ./Inspections.msapp --sources ./src/inspections --layout SourceCode --overwrite
git add ./src/inspections && git commit -m "Canvas app source"
pac canvas pack     --msapp ./Inspections.msapp --sources ./src/inspections --layout SourceCode --overwrite

Part 13 — pac pcf (Power Apps Component Framework controls)

What this group is for: Build code components (PCF controls) — custom TypeScript/React UI controls for model-driven and canvas apps.

pac pcf init

ParameterLong / shortRequired?What it’s for
Namespace--namespace / -nsOptionalControl namespace.
Name--name / -nOptionalControl name.
Template--template / -tOptionalfield (one column) or dataset (a grid/list).
Framework--framework / -fwOptionalnone (HTML, default) or react.
Output directory--outputDirectory / -oOptionalWhere to create the project.
Run npm install--run-npm-install / -npmOptional (switch)Auto-run npm install.
Code
pac pcf init --namespace Contoso --name LinearSlider --template field
pac pcf init --namespace Contoso --name OrdersGrid --template dataset --framework react --run-npm-install
pac pcf init --namespace Contoso --name LinearSlider --template field --outputDirectory ./controls/slider

pac pcf push

ParameterLong / shortRequired?What it’s for
Publisher prefix--publisher-prefix / -ppOptionalSolution publisher prefix (2–8 chars, not mscrm).
Solution unique name--solution-unique-nameOptionalExisting solution to add to.
Incremental--incremental / -incOptional (switch)Push only changed files.
Interactive--interactive / -iOptional (switch)Allow prompts — not for automation.
Verbosity--verbosity / -vOptionalminimal, normal, detailed, diagnostic.
Environment--environment / -envOptionalTarget environment.
Code
pac pcf push --publisher-prefix con
pac pcf push --publisher-prefix con --incremental
pac pcf push --publisher-prefix con --solution-unique-name ContosoControls --verbosity detailed --environment https://contoso-dev.crm.dynamics.com

pac pcf version

ParameterLong / shortRequired?What it’s for
Strategy--strategy / -sOptionalNone, GitTags, FileTracking, Manifest.
Patch version--patchversion / -pvOptionalSet the patch number (integer ≥ 0).
All manifests--allmanifests / -aOptional (switch)Update every ControlManifest.xml.
Path--path / -pOptionalPath to a specific manifest.
File name--filename / -fnOptionalTracker CSV (FileTracking strategy).
Update target--updatetarget / -utOptionalbuild or project.
Code
pac pcf version --patchversion 3
pac pcf version --strategy GitTags --allmanifests
pac pcf version --path ./controls/slider/ControlManifest.Input.xml --patchversion 4

Part 14 — pac pages (Power Pages websites)

What this group is for: Manage Power Pages websites — download/upload site content, clone, migrate Bootstrap, and migrate the data model. (Formerly pac paportalpac powerpagespac pages.)

pac pages list

ParameterLong / shortRequired?What it’s for
Verbose--verbose / -vOptional (switch)More detail per site.
Environment--environment / -envOptionalWhich environment.
Code
pac pages list
pac pages list --verbose --environment https://contoso-dev.crm.dynamics.com

pac pages download

ParameterLong / shortRequired?What it’s for
Path--path / -pRequiredLocal folder to download into.
Website ID--webSiteId / -idRequiredThe site to download.
Model version--modelVersion / -mvOptionalStandard (default) or Enhanced.
Include entities--includeEntities / -ieOptionalOnly these entities (comma-separated).
Exclude entities--excludeEntities / -xeOptionalSkip these entities.
Overwrite--overwrite / -oOptional (switch)Overwrite existing content.
Environment--environment / -envOptionalSource environment.
Code
pac pages download --webSiteId 11111111-1111-1111-1111-111111111111 --path ./site
pac pages download --webSiteId 11111111-1111-1111-1111-111111111111 --path ./site --modelVersion Enhanced --overwrite
pac pages download --webSiteId 11111111-1111-1111-1111-111111111111 --path ./site --includeEntities adx_webpage,adx_contentsnippet

pac pages download-code-site

ParameterLong / shortRequired?What it’s for
Path--path / -pRequiredLocal download folder.
Website ID--webSiteId / -idRequiredThe site to download.
Overwrite--overwrite / -oOptional (switch)Overwrite existing content.
Environment--environment / -envOptionalSource environment.
Code
pac pages download-code-site --webSiteId 22222222-2222-2222-2222-222222222222 --path ./codesite --overwrite

pac pages upload

ParameterLong / shortRequired?What it’s for
Path--path / -pRequiredLocal folder with site content.
Deployment profile--deploymentProfile / -dpOptionalProfile to use (default default).
Force upload all--forceUploadAll / -fOptional (switch)Upload everything, not just changes.
Model version--modelVersion / -mvOptionalData model version.
Environment--environment / -envOptionalTarget environment.
Code
pac pages upload --path ./site
pac pages upload --path ./site --forceUploadAll --environment https://contoso-test.crm.dynamics.com
pac pages upload --path ./site --deploymentProfile prod

pac pages upload-code-site

ParameterLong / shortRequired?What it’s for
Root path--rootPath / -rpRequiredRoot source folder.
Compiled path--compiledPath / -cpOptionalLocation of compiled output.
Site name--siteName / -snOptionalTarget site name.
Code
pac pages upload-code-site --rootPath ./codesite --compiledPath ./codesite/dist --siteName "Contoso Portal"

pac pages clone

ParameterLong / shortRequired?What it’s for
Path--path / -pRequiredSource content path.
Output directory--outputDirectory / -odRequiredWhere to write the clone.
Name--name / -nOptionalName for the clone.
Overwrite--overwrite / -oOptional (switch)Overwrite the output folder.
Code
pac pages clone --path ./site --outputDirectory ./site-copy --name "Contoso Portal v2" --overwrite

pac pages bootstrap-migrate

ParameterLong / shortRequired?What it’s for
Path--path / -pRequiredWebsite content path to migrate (Bootstrap V3 → V5).
Code
pac pages bootstrap-migrate --path ./site

pac pages migrate-datamodel

ParameterLong / shortRequired?What it’s for
Website ID--webSiteId / -idRequiredThe site to migrate.
Mode--mode / -mOptionalconfigurationData, configurationDataReferences, all.
Check status--checkMigrationStatus / -sOptional (switch)Check migration status.
Reset--resetMigration / -rsOptional (switch)Reset the migration.
Revert--revertToStandardDataModel / -rOptional (switch)Revert Enhanced → Standard.
Update version--updateDataModelVersion / -uOptional (switch)Update version after success.
Portal ID--portalId / -pidOptionalPortal ID.
Report path--siteCustomizationReportPath / -pOptionalCustomization report path.
Verbose--verbose / -vOptional (switch)More detail.
Environment--environment / -envOptionalWhich environment.
Code
pac pages migrate-datamodel --webSiteId 11111111-1111-1111-1111-111111111111 --mode all
pac pages migrate-datamodel --webSiteId 11111111-1111-1111-1111-111111111111 --checkMigrationStatus
pac pages migrate-datamodel --webSiteId 11111111-1111-1111-1111-111111111111 --revertToStandardDataModel

Part 15 — pac code (Preview) (Code apps)

What this group is for: “Code apps” are pro-code (React/HTML) apps that use Power Platform connectors and connection references for data and deploy with your solutions.

pac code init

ParameterLong / shortRequired?What it’s for
Display name--displayName / -nRequiredThe app’s display name.
Environment--environment / -envOptionalTarget Dataverse URL or GUID.
Description--description / -dOptionalApp description.
Build path--buildPath / -bOptionalDirectory of built assets.
File entry point--fileEntryPoint / -fOptionalFile the app loads from.
App URL--appUrl / -aOptionalLocal dev URL.
Logo path--logoPath / -lOptionalPath to a logo.
Region--region / -cOptionalRegion to host in.
Code
pac code init --displayName "Contoso Orders" --environment https://contoso-dev.crm.dynamics.com
pac code init --displayName "Contoso Orders" --buildPath ./dist --fileEntryPoint index.html --appUrl http://localhost:5173

pac code add-data-source

ParameterLong / shortRequired?What it’s for
API ID--apiId / -aRequiredThe connector’s API ID (e.g. shared_sql).
Connection ID--connectionId / -cOptionalThe connection to use.
Table--table / -tOptionalTable name.
Dataset--dataset / -dOptionalDataset name.
Stored procedure--storedProcedure / -spOptionalSQL stored procedure.
Connection reference--connectionRef / -crOptionalConnection reference ID.
Solution ID--solutionId / -sOptionalSolution of the connection reference.
Log level--logLevel / -lOptionalLogging verbosity.
Environment--environment / -envOptionalThe data source’s environment.
Code
pac code add-data-source --apiId shared_sql --connectionId 33333333-3333-3333-3333-333333333333 --table Orders
pac code add-data-source --apiId shared_sql --connectionId 33333333-3333-3333-3333-333333333333 --storedProcedure usp_GetOpenOrders
pac code add-data-source --apiId shared_commondataserviceforapps --connectionRef con_dataverseRef --solutionId 44444444-4444-4444-4444-444444444444 --table account

pac code delete-data-source

ParameterLong / shortRequired?What it’s for
Data source name--dataSourceName / -dsRequiredThe data source to remove.
API ID--apiId / -aRequiredThe connector’s API ID.
Stored procedure--storedProcedure / -spOptionalSpecific stored procedure to remove.
Code
pac code delete-data-source --dataSourceName Orders --apiId shared_sql

pac code run / pac code push

CommandPurposeParameters
pac code runRun a local server loading connections locally.(confirm with --help)
pac code pushPublish a new version of the app.--environment / -env, --solutionName / -s
Code
pac code run
pac code push
pac code push --solutionName ContosoCore --environment https://contoso-dev.crm.dynamics.com

pac code list… discovery commands

CommandPurposeKey parameters
pac code listList code apps.(none)
pac code list-connection-referencesList connection references in a solution.--solutionId / -s (req), --environment
pac code list-datasetsList datasets a connector exposes.--apiId / -a (req), --connectionId / -c
pac code list-tablesList tables a connector/dataset exposes.--apiId / -a (req), --connectionId / -c, --dataset / -d
pac code list-sql-stored-proceduresList stored procedures for a SQL connection.--connectionId / -c, --dataset / -d
Code
pac code list
pac code list-connection-references --solutionId 44444444-4444-4444-4444-444444444444
pac code list-tables --apiId shared_sql --connectionId 33333333-3333-3333-3333-333333333333
pac code list-sql-stored-procedures --connectionId 33333333-3333-3333-3333-333333333333

Part 16 — pac admin (Environment & tenant administration)

What this group is for: The administrator’s toolkit — create/copy/delete/reset environments, take/restore backups, assign users and roles, register Entra ID apps and service principals, manage environment groups, and configure tenant governance. Organized by job below. Commands marked — verify with --help couldn’t be captured verbatim from current docs; your local CLI shows exact flags.

Environment lifecycle

pac admin create

ParameterLong / shortRequired?What it’s for
Type--type / -tRequiredTrial, Sandbox, Production, Developer, Teams, SubscriptionBasedTrial.
Name--name / -nOptionalDisplay name.
Domain--domain / -dOptionalURL segment (e.g. contosotest).
Region--region / -rOptionalRegion (default unitedstates).
Currency--currency / -cOptionalBase currency (default USD).
Language--language / -lOptionalBase language (default English).
Templates--templates / -tmOptionalD365 apps to deploy (comma-separated).
Security group--security-group-id / -sgidOptionalEntra/M365 group ID (required for Teams envs).
Input file--input-file / -ifOptionalJSON of arguments (CLI args override).
Async--async / -aOptional (switch)Run asynchronously.
JSON--jsonOptional (switch)Machine-readable output.
Code
pac admin create --name "Contoso Test" --type Sandbox --domain ContosoTest
pac admin create --name "Contoso Marketing" --type Production --region europe --currency EUR --domain ContosoMarketing
pac admin create --input-file ./config.json

pac admin list

ParameterLong / shortRequired?What it’s for
Type--type / -tOptionalFilter by type.
Name--name / -nOptionalFilter by name substring.
Application--application / -aOptionalOnly envs with a given app.
Environment--environment / -envOptionalFilter by name/ID substring.
JSON--jsonOptional (switch)Machine-readable output.
Code
pac admin list
pac admin list --type Sandbox
pac admin list --json

pac admin copy

ParameterLong / shortRequired?What it’s for
Source env--source-env / -seOptionalEnvironment copied from.
Target env--target-env / -teOptionalEnvironment copied to (overwritten).
Type--type / -tOptionalMinimalCopy or FullCopy.
Name--name / -nOptionalTarget environment name.
Skip audit data--skip-audit-data / -saOptional (switch)Don’t copy audit data.
Async--async / -aOptional (switch)Run asynchronously.
Code
pac admin copy --name "Contoso Test" --source-env 11111111-1111-1111-1111-111111111111 --target-env 22222222-2222-2222-2222-222222222222 --type MinimalCopy
pac admin copy --source-env 11111111-1111-1111-1111-111111111111 --target-env 22222222-2222-2222-2222-222222222222 --type FullCopy --skip-audit-data

pac admin delete

ParameterLong / shortRequired?What it’s for
Environment--environment / -envOptionalThe environment to delete.
Async--async / -aOptional (switch)Run asynchronously.
Code
pac admin delete --environment 22222222-2222-2222-2222-222222222222
pac admin delete --environment https://contosomarketing.crm4.dynamics.com

pac admin reset / list-app-templates

reset — wipes an environment back to clean; key flag --environment, others (name, currency, language, purpose, templates, async) — verify with --help. list-app-templates — lists D365 templates; --region / -r (optional).

Code
pac admin reset --environment 22222222-2222-2222-2222-222222222222
pac admin list-app-templates --region Europe

Backups

CommandKey parameters
pac admin backup--label / -l (req), --environment / -env
pac admin list-backups--environment / -env
pac admin restoresource/target + selected-backup flags — verify with --help
pac admin set-backup-retention-periodretention days 7|14|21|28 (req), --environment — verify alias
Code
pac admin backup --environment 11111111-1111-1111-1111-111111111111 --label "Pre-release backup"
pac admin list-backups --environment 11111111-1111-1111-1111-111111111111

Users, security & service principals

pac admin assign-user

ParameterLong / shortRequired?What it’s for
User--user / -uRequiredObject ID/UPN, or App ID for an app user.
Role--role / -rRequiredSecurity role name or ID.
Application user--application-user / -auOptional (switch)Treat --user as an app user.
Business unit--business-unit / -buOptionalBusiness unit to associate.
Environment--environment / -envOptionalWhich environment.
Code
pac admin assign-user --environment 11111111-1111-1111-1111-111111111111 --user user@contoso.com --role "Basic User"
pac admin assign-user --environment 11111111-1111-1111-1111-111111111111 --user 33333333-3333-3333-3333-333333333333 --business-unit 44444444-4444-4444-4444-444444444444 --role "System Administrator"
pac admin assign-user --environment 11111111-1111-1111-1111-111111111111 --user 55555555-5555-5555-5555-555555555555 --role "System Administrator" --application-user

pac admin assign-group

ParameterLong / shortRequired?What it’s for
Group--group / -gRequiredEntra ID object ID of the group.
Group name--group-name / -gnRequiredName of the group/team in Dataverse.
Membership type--membership-type / -mtRequiredMembersAndGuests, Members, Owners, Guests.
Role--role / -rRequiredSecurity role to apply.
Team type--team-type / -ttRequiredOwner, Access, AadSecurityGroup, AadOfficeGroup.
Business unit--business-unit / -buOptionalBusiness unit to associate.
Environment--environment / -envOptionalWhich environment.
Code
pac admin assign-group --environment 11111111-1111-1111-1111-111111111111 --group 66666666-6666-6666-6666-666666666666 --group-name "Sales Team" --membership-type Members --team-type AadSecurityGroup --role "Basic User"

pac admin create-service-principal

Creates an Entra app and an app user; outputs Tenant ID, Application ID, Client Secret, expiration.

ParameterLong / shortRequired?What it’s for
Environment--environment / -envOptionalThe environment to add the app user to.
Name--name / -nOptionalApplication name to create in Entra ID.
Role--role / -rOptionalSecurity role (default System Administrator).
Code
pac admin create-service-principal --environment 11111111-1111-1111-1111-111111111111
pac admin create-service-principal --environment 11111111-1111-1111-1111-111111111111 --name "Contoso CI/CD" --role "Basic User"

pac admin list-roles / self-elevate

list-roles--environment / -env (verify extra flags). self-elevate — grant yourself System Administrator; --environment / -env.

Code
pac admin list-roles --environment 11111111-1111-1111-1111-111111111111
pac admin self-elevate --environment 11111111-1111-1111-1111-111111111111

Entra ID apps

CommandPurposeParameters
pac admin application listList registered Entra ID apps.(none)
pac admin application registerRegister an Entra ID app.--application-id / -id (req)
pac admin application unregisterUnregister an Entra ID app.--application-id / -id (req)
pac admin list-service-principalList apps with Dataverse access.--environment / -env (verify)
Code
pac admin application list
pac admin application register --application-id 77777777-7777-7777-7777-777777777777
pac admin application unregister --application-id 77777777-7777-7777-7777-777777777777
pac admin list-service-principal --environment 11111111-1111-1111-1111-111111111111

Environment groups & governance

CommandPurposeParameters
pac admin add-groupAdd an environment to a group.--environment-group / -eg (req), --environment / -env
pac admin list-groupsList environment groups.--environment / -env (verify)
pac admin set-governance-configEnable/disable/edit Managed Environments.--environment + config flags — verify with --help
pac admin set-runtime-stateChange administration mode.--environment / -env + state flag — verify
pac admin dlp-policy listList DLP policies.(none)
pac admin dlp-policy showShow one DLP policy.--policy-name / -pn (req, GUID)
pac admin list-tenant-settingsList tenant settings.--json
pac admin update-tenant-settingsUpdate tenant settings.settings input — verify with --help
pac admin statusList in-progress operations.(none)
Code
pac admin add-group --environment-group 88888888-8888-8888-8888-888888888888 --environment 11111111-1111-1111-1111-111111111111
pac admin dlp-policy list
pac admin dlp-policy show --policy-name 99999999-9999-9999-9999-999999999999
pac admin list-tenant-settings --json
pac admin status

Part 17 — pac catalog (Power Platform Catalog)

What this group is for: The org’s internal library of approved reusable components. Consumers: list → install → status. Publishers: submit → status → update.

pac catalog list

ParameterLong / shortRequired?What it’s for
Catalog item name--catalog-item-name / -nOptionalSearch by name.
Catalog item ID--catalog-item-id / -cidOptionalSearch by ID (name ignored if given).
Include active--include-active / -iaOptional (switch)Include active items.
JSON--jsonOptional (switch)Machine-readable output.
Environment--environment / -envOptionalEnvironment that hosts the catalog.
Code
pac catalog list
pac catalog list --catalog-item-name "Onboarding"
pac catalog list --catalog-item-id 11111111-1111-1111-1111-111111111111 --json

pac catalog install

ParameterLong / shortRequired?What it’s for
Catalog item ID--catalog-item-id / -cidRequiredThe item to install.
Target env--target-env / -teOptionalEnvironment to install into.
Target version--target-version / -tvOptionalSpecific version (default published).
Settings--settings / -sOptionalRuntime install settings key=value|key=value.
Poll status--poll-status / -psOptional (switch)Wait/poll until done.
Environment--environment / -envOptionalEnvironment hosting the catalog.
Code
pac catalog install --catalog-item-id 11111111-1111-1111-1111-111111111111 --poll-status
pac catalog install --catalog-item-id 11111111-1111-1111-1111-111111111111 --target-version 2.0.0 --target-env https://contoso-test.crm.dynamics.com

pac catalog submit

ParameterLong / shortRequired?What it’s for
Path--path / -pRequiredSubmission document.
Package zip--package-zip / -pzOptionalPackage zip to submit.
Solution zip--solution-zip / -szOptionalSolution zip to submit.
Poll status--poll-status / -psOptional (switch)Poll until done.
Environment--environment / -envOptionalEnvironment hosting the catalog.
Code
pac catalog submit --path ./submission.json --solution-zip ./ContosoCore_managed.zip --poll-status
pac catalog submit --path ./submission.json --package-zip ./ContosoPackage.zip

pac catalog status / update / create-submission

CommandKey parameters
pac catalog status--tracking-id / -id (req), --type / -t (req, Install/Submit), --environment
pac catalog update--path / -p (req), --environment
pac catalog create-submission--path / -p (being removed in a future release)
Code
pac catalog status --tracking-id 22222222-2222-2222-2222-222222222222 --type Install
pac catalog update --path ./catalog-settings.json
pac catalog create-submission --path ./submission.json

Part 18 — pac application (Marketplace/Dataverse applications)

What this group is for: Discover and install Dataverse applications from Microsoft Marketplace/AppSource.

pac application list

ParameterLong / shortRequired?What it’s for
Environment--environment / -envOptionalList for a specific env (else tenant-wide).
Install state--installState / -sOptionalNotInstalled, Installed, All.
Output--output / -oOptionalWrite the list to a JSON file.
Code
pac application list
pac application list --environment https://contoso-dev.crm.dynamics.com --installState NotInstalled
pac application list --installState All --output ./apps.json

pac application install

ParameterLong / shortRequired?What it’s for
Application name--application-name / -anOptional*Unique name of one app to install.
Application list--application-list / -alOptional*JSON file listing several apps.
Environment--environment / -envOptionalEnvironment to install into.

*Provide one of --application-name or --application-list.

Code
pac application install --application-name msdyn_FieldServiceAnchor --environment https://contoso-dev.crm.dynamics.com
pac application install --application-list ./apps.json --environment https://contoso-dev.crm.dynamics.com

Part 19 — pac connector (Custom connectors)

What this group is for: Build and manage custom connectors — an OpenAPI definition + API properties (auth) file, optional icon and C# script — and create/update/download them in Dataverse.

pac connector init

ParameterLong / shortRequired?What it’s for
Connection template--connection-template / -ctOptionalNoAuth, BasicAuth, ApiKey, OAuthGeneric, OAuthAAD.
Generate script file--generate-script-fileOptional (switch)Also create a .csx script.
Generate settings file--generate-settings-fileOptional (switch)Also create a settings file.
Output directory--outputDirectory / -oOptionalWhere to create the files.
Code
pac connector init --connection-template ApiKey --outputDirectory ./connector
pac connector init --connection-template OAuthAAD --generate-script-file --outputDirectory ./connector

pac connector create / update

Shared parameters: --api-definition-file / -df, --api-properties-file / -pf, --icon-file / -if, --script-file / -sf, --settings-file, --solution-unique-name / -sol, --environment / -env. update adds --connector-id / -id.

Code
pac connector create --api-definition-file ./connector/apiDefinition.json --api-properties-file ./connector/apiProperties.json
pac connector create --api-definition-file ./connector/apiDefinition.json --api-properties-file ./connector/apiProperties.json --icon-file ./connector/icon.png --solution-unique-name ContosoCore
pac connector update --connector-id 44444444-4444-4444-4444-444444444444 --api-definition-file ./connector/apiDefinition.json --api-properties-file ./connector/apiProperties.json

pac connector list / download

CommandKey parameters
pac connector list--json, --environment / -env
pac connector download--connector-id / -id (req), --outputDirectory / -o, --environment / -env
Code
pac connector list
pac connector download --connector-id 44444444-4444-4444-4444-444444444444 --outputDirectory ./connector

Part 20 — pac tool (Launch Power Platform desktop tools)

⚠️

Windows-only. Launches Windows desktop apps; won’t run on macOS/Linux.

CommandPurposeParameters
pac tool listList launchable tools + versions.(none)
pac tool cmtConfiguration Migration Tool.--update / -u (switch), --clear / -c (switch)
pac tool pdPackage Deployer.--update / -u (switch), --clear / -c (switch)
pac tool prtPlugin Registration Tool.--update / -u (switch), --clear / -c (switch)
pac tool adminOpen the Admin Center in a browser.--environment / -env
pac tool makerOpen the Maker Portal in a browser.--environment / -env
Code
pac tool list
pac tool cmt --update
pac tool pd --clear --update
pac tool prt --update
pac tool admin --environment https://contoso-prod.crm.dynamics.com
pac tool maker --environment https://contoso-dev.crm.dynamics.com

Part 21 — pac power-fx (Preview)

What this group is for: Run Power Fx from the command line against Dataverse.

pac power-fx repl

ParameterLong / shortRequired?What it’s for
Environment--environment / -envOptionalWhich environment to run against.
📌

Known issue: the REPL can hang on a Windows MSI install — prefer .NET-tool/VS Code for repl.

Code
pac power-fx repl
pac power-fx repl --environment https://contoso-dev.crm.dynamics.com

pac power-fx run

ParameterLong / shortRequired?What it’s for
File--file / -fRequiredPath to the Power Fx file to execute.
Echo--echo / -eOptional (switch)Echo input commands to output.
Environment--environment / -envOptionalWhich environment to run against.
Code
pac power-fx run --file ./scripts/seed-data.powerfx
pac power-fx run --file ./scripts/seed-data.powerfx --echo
pac power-fx run --file ./scripts/seed-data.powerfx --environment https://contoso-test.crm.dynamics.com

Part 22 — pac telemetry

What this group is for: Control whether the CLI sends anonymous usage data. Three commands, no parameters.

CommandWhat it does
pac telemetry statusShow whether telemetry is on or off.
pac telemetry enableOpt in.
pac telemetry disableOpt out.
Code
pac telemetry status
pac telemetry disable
pac telemetry enable
💡

CI tip: set PP_TOOLS_TELEMETRY_OPTOUT=1 (or true) to opt out for an entire shell/agent.

Part 23 — pac help

What this group is for: Your built-in, always-accurate reference — reflects your installed version exactly.

FormWhat it does
pac helpList every command group.
pac <group> helpList sub-commands in a group.
pac <group> <command> --helpFull parameter list for one command.
Code
pac help
pac solution help
pac solution export --help
pac copilot init --help
pac admin create --help

This is the fallback for every command flagged “verify with --help” in this document.

Appendix A — Power Automate via the CLI

There is no dedicated pac command group for cloud or desktop flows. Options:

  • Solution ALM — flows ship inside solutions: pac solution export/import/pack/unpack.
  • Connections/connectorspac connection, pac connector manage what flows depend on.
  • Desktop flows (PAD) — trigger via a Run URL: "…\PAD.Console.Host.exe" "ms-powerautomate:/console/flow/run?workflowName=<name>" (requires Power Automate Premium).
  • Power Platform Build Tools — Azure DevOps / GitHub Actions wrap pac for CI/CD.
  • Community CLIs — e.g. open-source Python wrappers around the Power Automate Management API (flow list/get/create/start/stop/delete). Not Microsoft-supported.

Appendix B — Deprecated groups

These exist but are deprecated and intentionally omitted from the main reference:

  • pac modelbuilder (Deprecated) — code generator for early-bound Dataverse .NET classes (replaces CrmSvcUtil.exe). Use pac modelbuilder build if you must.
  • pac test (Deprecated) — pac test run executes a Power App Test Plan file. Pre-release; breaking changes were introduced in CLI 1.43.

Reference reflects Microsoft Power Platform CLI v2.8.1 and current Microsoft Learn documentation. Always treat pac <command> --help as the authoritative source for your installed version.

Discussion

Loading...