Back up the tenant configuration to files
cs_backup_tenantCapture the entire Power Platform tenant configuration—settings, environments, DLP policies, apps, solutions, and more—to local files for diffing, reference, and source control.
Instructions
Write the tenant's Power Platform configuration to local files for reference, diffing and source control: tenant settings, environments, DLP policies, environment groups, service principals, registered applications and app templates, plus per environment its details, solutions, agents, connections, security roles and platform backups. Read-only for the tenant; it only writes files. Runs as the admin account: pass 'profile' or set CPS_ADMIN_PROFILE. Each capture is independent, so a command the account cannot run is reported in 'skipped' and the rest still completes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dir | Yes | Folder to write the backup into (created; existing files with the same names are overwritten) | |
| profile | No | pac auth profile of the admin account; default CPS_ADMIN_PROFILE, then the active profile | |
| clientId | No | Entra app (client) id for MSAL. Defaults to CPS_CLIENT_ID, then the first-party VS Code id. | |
| tenantId | No | Entra tenant id. Defaults to the workspace sync metadata, then CPS_TENANT_ID. | |
| environments | No | Environments to detail; default: every environment 'pac admin list' returns | |
| includeRoles | No | Default true: the security roles of each environment | |
| includeBackups | No | Default true: the platform backups of each environment | |
| maxEnvironments | No | Default 50 | |
| includeDataverse | No | Default true: flows, connection references, environment variables and agents per environment, when a Dataverse sign-in is cached (cs_login) | |
| includeEnvironments | No | Default true; false captures tenant level only |