configure-env-variables

Creates Dataverse environment variables and links them to Power Pages site settings for ALM.

808|167|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/microsoft/power-platform-skills --skill configure-env-variables
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: configure-env-variables
Source: https://github.com/microsoft/power-platform-skills/tree/main/plugins/power-pages/skills/configure-env-variables
Command: npx skills add https://github.com/microsoft/power-platform-skills --skill configure-env-variables

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Power Pages site settings are static by default, so values like authentication client IDs and login toggles cannot differ between dev, staging, and production environments. This Skill converts selected site settings into Dataverse environment variables and generates a deployment-settings.json so pipeline deployments inject the correct per-stage values.

Core Features & Use Cases

  • Environment variable creation: Creates String or Secret type environment variable definitions in Dataverse, including Key Vault-backed secret references, and adds them to the solution.
  • Site setting linking: Links Power Pages site settings to environment variables via a verified OData PATCH so the runtime reads per-environment values.
  • Deployment settings generation: Writes and validates a deployment-settings.json with per-stage override values consumed by the deploy-pipeline skill.
  • Use Case: A maker promoting a Power Pages site from dev to production needs the Entra ID ClientId and local-login toggle to differ per stage; this Skill creates the env vars, links the settings, and produces the stage-specific values file.

Quick Start

Ask the agent to configure environment variables for my Power Pages site settings so each deployment stage gets its own values.

Frequently Asked Questions about configure-env-variables

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make Power Pages site settings environment-specific?

Back the site settings with Dataverse environment variables. The skill creates an environment variable definition per setting, links the site setting via an OData PATCH that flips mspp_source to 1, and generates a deployment-settings.json with per-stage values.

How do I configure environment variables in Dataverse for ALM?

Run this skill after setup-solution: it discovers existing site settings, lets you pick which ones to promote, creates the env var definitions in Dataverse, adds them to the solution, and writes deployment-settings.json for pipeline deployments.

Can Power Pages environment variables store secrets from Azure Key Vault?

Yes. Secret-type environment variables accept a Key Vault Secret Identifier URI or full Azure resource ID, which Dataverse dereferences at runtime. Plain-text secrets and placeholder formats like @KeyVault(...) are rejected by the pre-write validator.

Why does my pipeline deployment fail with an invalid secret reference error?

The deploymentsettingsjson import fails when deployment-settings.json contains non-canonical secret values such as @KeyVault(...) placeholders, raw secret text, or malformed URIs. Use a Key Vault Secret Identifier URI, an Azure resource ID, or an empty string to fall back to the definition default.

What prerequisites are needed before configuring Power Pages environment variables?

You need PAC CLI authenticated, an Azure CLI access token, a .solution-manifest.json created by setup-solution, and a deployed Power Pages site with a .powerpages-site folder. The skill also checks for an existing ALM plan from plan-alm before proceeding.