Power automate solutions
Work with Microsoft Power Platform solutions and solution-scoped environment variables from the command line. Use for listing solutions, inspecting solution components, reading and setting environment variable values (String/Number/Boolean/JSON), handling Secret (Azure Key Vault) variables safely, connection references, and shipping flows through a DEV -> PROD pipeline via the power-automate CLI.
ByWals.pro teamPower Platform consultancy @ Wals.pro- name:
- power-automate-solutions
- description:
- Work with Microsoft Power Platform solutions and solution-scoped environment variables from the command line. Use for listing solutions, inspecting solution components, reading and setting environment variable values (String/Number/Boolean/JSON), handling Secret (Azure Key Vault) variables safely, connection references, and shipping flows through a DEV -> PROD pipeline via the power-automate CLI.
Power Automate Solutions & Environment Variables
Use this skill for application lifecycle management (ALM) of Power Platform
cloud flows: solutions, environment variables, and the DEV -> PROD pipeline.
The default tool is the power-automate CLI.
Core idea
- Solutions are the unit of deployment. Unmanaged solutions hold the editable source in DEV; managed solutions are the deployed result in PROD.
- Environment variables parameterize a solution so the same flow behaves correctly across environments (e.g. a different API base URL or record id in DEV vs PROD). A variable has a definition (schema name, type, optional default) and, per environment, a value.
- Create/edit flows in DEV inside an unmanaged solution, then ship the solution through the pipeline. Never edit on PROD directly.
Commands
# Solutions
power-automate solutions --profile acme # list (managed + unmanaged)
power-automate solutions --profile acme --unmanaged-only
power-automate solution-components --profile acme --solution <unique-name>
# Environment variables
power-automate env-vars --profile acme # all definitions + current/default values
power-automate env-vars --profile acme --solution <unique-name> # only this solution's variables
power-automate env-var-get --profile acme acme_ApiBaseUrl
power-automate env-var-set --profile acme acme_ApiBaseUrl "https://api.example.com" --solution <unique-name> --dry-run
power-automate env-var-set --profile acme acme_ApiBaseUrl "https://api.example.com" --solution <unique-name>
Add a new flow to a solution at creation time so it ships through the pipeline:
power-automate create --profile acme flow.json --name "My Flow" --solution <unique-name> --dry-run
Secret-handling rules (read before touching values)
- Secret-type environment variables are backed by Azure Key Vault. The
CLI masks their values by default (
<secret · Azure Key Vault-backed>).--reveal-secretshows only the Key Vault reference, never the secret value itself. env-var-setrefuses Secret-type variables. Configure those in the Power Platform portal or via a Key Vault reference — never pass a secret as a CLI argument (it would land in shell history, logs, and Dataverse as plaintext).- Never commit real environment variable values, schema names tied to a real customer, or GUIDs into source control. Use placeholders.
Procedure
solutionsto find the target unmanaged solution.solution-components --solution <unique-name>to see what it contains (flows = "Workflow / Cloud flow", env vars = "EnvironmentVariableDefinition", connection references, etc.).env-vars --solution <unique-name>to review the variables the flow depends on; confirm types and which have values in this environment.- For non-secret config,
env-var-set ... --dry-runthen the real set, passing--solutionso the value belongs to the solution. - For secret config, set it in the portal / Key Vault; only confirm presence
with
env-var-get(masked). - Read
references/solutions-alm.mdfor solution types, component-type codes, environment variable types, connection references, and DEV -> PROD notes.
Related skills
power-automate-api-clientfor pull/diff/deploy/verify of the flow itself.power-automate-action-configurationforconnectionReferencesinside the flow definition.power-automate-run-forensicswhen a deployed flow misbehaves per environment (often a missing or wrong environment variable value).
Open this reference as its own page
Solutions & ALM reference
Routing notes and stable facts for Power Platform solution work. Verify exact current behavior against Microsoft Learn when it matters.
Solution types
- Unmanaged — the editable source. Lives in DEV. Components can be added, edited, removed. This is what you build in.
- Managed — the deployed, locked result. Lives in TEST/PROD. Imported from an exported managed solution; not edited in place.
- Default / Common Data Services Default Solution — catch-all for customizations not yet assigned to a solution. Avoid shipping from here; put flows in a named unmanaged solution so they move through the pipeline.
Environment variables
A variable has a definition (environmentvariabledefinition: schemaname,
displayname, type, optional defaultvalue) and a per-environment value
(environmentvariablevalue: value). Effective value = the environment's value
if set, otherwise the default.
Types (type option set):
| Code | Type | Notes |
|---|---|---|
| 100000000 | String | Plain text (URLs, names). Not a secret store — but can still be sensitive config. |
| 100000001 | Number | |
| 100000002 | Boolean | |
| 100000003 | JSON | Structured config. |
| 100000004 | Data Source | Connector data-source binding. |
| 100000005 | Secret | Azure Key Vault-backed. The stored value is a Key Vault reference, not the secret. Set/rotate in Key Vault + portal, not via plain values. |
ALM rule: add the definition to the solution; set the value per
environment (DEV/PROD differ). The CLI's env-var-set --solution <name> keeps
the value associated with the solution.
Solution component types (common codes)
Seen in solution-components:
| Code | Component |
|---|---|
| 1 | Entity (table) |
| 29 | Workflow / Cloud flow |
| 31 | Report |
| 60 | SystemForm |
| 61 | WebResource |
| 62 | SiteMap |
| 90 | PluginAssembly |
| 91 | SDKMessageProcessingStep |
| 92 | ServiceEndpoint |
| 300 | CanvasApp |
| 380 | EnvironmentVariableDefinition |
| 381 | EnvironmentVariableValue |
| 10112 | ConnectionReference |
Connection references
A connectionreference decouples a flow from a specific connection so the same
solution can bind to different connections per environment. They appear as
component type 10112 and in the flow's connectionReferences. On import to a new
environment you (re)map them. See power-automate-action-configuration for the
in-flow connectionReferences shape.
DEV -> PROD pipeline (high level)
- Build/edit flows in an unmanaged solution in DEV.
- Add environment variable definitions (with sensible DEV values) and connection references to the solution.
- Export as managed; import into TEST/PROD.
- On import, supply the target environment's values (env vars) and map connection references. Managed solution pipelines (Power Platform Pipelines) automate this.
- Never hand-edit managed flows on PROD; change in DEV and re-ship.
Microsoft Learn sources
- Solutions overview: https://learn.microsoft.com/en-us/power-apps/maker/data-platform/solutions-overview
- Environment variables: https://learn.microsoft.com/en-us/power-apps/maker/data-platform/environmentvariables
- Use Key Vault secrets in environment variables: https://learn.microsoft.com/en-us/power-apps/maker/data-platform/environmentvariables-azure-key-vault-secrets
- Connection references: https://learn.microsoft.com/en-us/power-apps/maker/data-platform/create-connection-reference
- Healthy ALM: https://learn.microsoft.com/en-us/power-platform/alm/
- Dataverse Web API (solutions/components): https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/overview
More in this playbook
Safe to turn on
Use this skill when an agent or person is about to create, change or enable an automation inside someone else's account or a shared environment: "create this workflow", "build it in the customer's account", "turn it on", "go live", "deploy this automation". Produces a proposal the human approves, an automation created in the off state, and a short list of what only the human can finish.
Workflow buildingMITn8n agents
Design n8n AI agents the right way. Use when building or editing any @n8n/n8n-nodes-langchain.* AI node — an AI Agent, LLM chain, Text Classifier, or Information Extractor — and whenever the user mentions AI agents, LLM with tools, tool calling, $fromAI, system prompts, agent memory, sessionId, structured/JSON output, output parser, RAG, vector store, a chat assistant/bot, or human-in-the-loop review. Covers Agent-vs-chain-vs-classifier choice, the model/memory/tools/outputParser slots, tool names/descriptions as prompt, structured output with autoFix, memory, RAG, human review, and chat topologies.
Workflow buildingMITn8n agents
Design n8n AI agents the right way. Use when building or editing any @n8n/n8n-nodes-langchain.* AI node — an AI Agent, LLM chain, Text Classifier, or Information Extractor — and whenever the user mentions AI agents, LLM with tools, tool calling, $fromAI, system prompts, agent memory, sessionId, structured/JSON output, output parser, RAG, vector store, a chat assistant/bot, or human-in-the-loop review. Covers Agent-vs-chain-vs-classifier choice, the model/memory/tools/outputParser slots, tool names/descriptions as prompt, structured output with autoFix, memory, RAG, human review, and chat topologies.


