Skip to content
Menu

Articles

Power Platform ALM: Solutions, environments and pipelines

Move Power Automate flows safely from dev to test and production with solutions, connection references, environment variables and Pipelines. Step by step.

Anders Jensen Automation & AI Instructor

Power Platform ALM is how you stop building and fixing flows in the same place your colleagues use them. Edit a live flow, and every mistake hits the business. This guide takes one flow from dev to test to production with solutions, connection references, environment variables and Pipelines, including flows that live in the default environment today.

The example is an ordinary internal process: Employees sign up for internal courses in a SharePoint list, and the flow posts a Teams message to the person who handles the sign-ups. It is deliberately small, and the same steps apply to a flow with fifty actions.

Moving a flow from dev to production is one of the questions I hear most often. The answer is a handful of habits that only work together.

Why flows need to leave the default environment

Everyone in your tenant shares the default environment, and every licensed user is a maker there. Microsoft writes that it "shouldn't be used for production workloads". The Default Solution cannot be exported either, so an existing flow must first go into a solution of its own.

Without a test environment, you fix things where your colleagues work, and a flow with one owner is at risk when that person leaves.

ALM (application lifecycle management) is the set of fixed rules for where you build, where you test and where the flow runs for real.

Overview: How it fits together

The diagram shows the end result: Three environments, the same solution in each, and the things that never travel with it.

Diagram of Power Platform ALM with three environments: Dev as an unmanaged Sandbox, Test as a managed Sandbox and Prod as a managed Production environment, each holding the Training Sign-up solution with a cloud flow, connection references and environment variables, connections and SharePoint lists marked as never travelling, Pipeline arrows between them and a governance band

The terms, with an analogy where one helps:

TermWhat it isThink of it as
TenantYour organisation's Microsoft 365 and Entra ID
EnvironmentA container for flows, apps and data, such as Dev, Test or Production
DataverseThe database behind an environment, where solutions live
SolutionThe package that holds your flow and what it needsA moving box
PublisherWho made the solution. Sets the prefix on technical namesThe sender's stamp on the box
ConnectorThe integration to a service, such as SharePoint or Teams
ConnectionA saved sign-in to a connectorA key
Connection referenceThe placeholder in the solution that points to a connectionThe hook the key hangs on
Environment variableA value that differs per environmentAn address label
Unmanaged and managedThe editable version in dev, and the locked version everywhere elseAn open box and a sealed box
PipelineMoves a solution between environmentsA conveyor belt
Service principalAn application identity that can own flows instead of a person

One thing is easy to miss: A solution moves the recipe for the flow. Connections, Dataverse data, SharePoint sites and lists must already exist in each environment.

Environments: Dev, test and production

Which environments you need

You need at least separate environments for development and production, and Microsoft recommends at least one test environment too. Every environment that takes part in ALM must have a Dataverse database.

Environment types: When to use which

You choose the type under "Type" when you create the environment.

The New environment panel in the Power Platform admin center with the Type list open showing Trial (subscription-based), Developer, Production, Trial and Sandbox, and a summary for andersjensenorg - Dev as a Sandbox in Europe with a database
TypeWhat it isWho uses itDev, test or production
DeveloperPersonal. Microsoft calls it "intended only for use by the owner". Security groups cannot be assignedOne developer trying things outPersonal dev, not shared dev
SandboxNon-production. Can be copied and reset, and a reset deletes everything for goodThe team that builds and testsShared dev and test
ProductionFor permanent work in the organisationThe users of finished flows and appsProduction. Microsoft also recommends it as the Pipelines host
DefaultOne per tenant, for experiments and light apps and flows. Cannot be deletedEveryone in the tenantNeither
TrialExpires after 30 days, with one 30-day extension. One per user. Cannot be reset, backed up or copiedSomeone trying Power PlatformNeither. Can be converted to Production

Production and Sandbox need at least 1 GB of free database capacity to be created. The list also offers "Trial (subscription-based)", which according to Microsoft only tenant-level admins can create. Microsoft Dataverse for Teams environments can still appear in the list, but Microsoft is retiring them.

Change an environment's type later

Three changes are possible:

  1. Production to Sandbox: "Manage" › "Environments" › select the environment › "Edit" › "Type" › "Sandbox" › "Save".
  2. Trial to Production: "Manage" › "Environments" › select the trial environment › "Convert to production". Requires 1 GB of free capacity.
  3. Sandbox to Production: "Manage" › "Environments" › "…" next to the Sandbox environment › "Convert to production".

Developer environments are personal

Microsoft is phasing out unmanaged developer environments. No new ones can be created from November 15, 2026, existing ones are suspended from December 15, 2026, and deletion starts on January 15, 2027. Managed developer environments remain, one per user, and running anything in them requires a premium licence.

Create an environment

  1. Open the Power Platform admin center, and go to "Manage" › "Environments" › "New".
  2. Enter a name such as "andersjensenorg - Dev", and choose "Sandbox" and your region.
  3. Open "Change default settings", and set "Add a Dataverse data store?" to "Yes". It is set to "No" by default.
  4. Click "Next", and finish the Dataverse settings.
  5. Repeat for Test (Sandbox) and Production (Production) in the same region, so Pipelines can see them without extra settings.

The list after Test and Production became Managed Environments:

The Environments list in the Power Platform admin center with andersjensenorg - Production as a managed Production environment, andersjensenorg - Test as a managed Sandbox, andersjensenorg - Dev as an unmanaged Sandbox, all in Europe with Dataverse, plus the default environment

Permissions in dev

Give developers the roles Environment Maker and System Customizer in dev. Microsoft's overview of the built-in roles lists Environment Maker for cloud flows outside solutions, and System Customizer for cloud flows, desktop flows and tables. To assign them:

  1. In the Power Platform admin center, select the dev environment, and go to "Settings" › "Users + permissions" › "Users".
  2. Select the user, and choose "Manage security roles".
  3. Select "Environment Maker" and "System Customizer", and save.
The Role assignment confirmation dialog listing Basic User, Environment Maker, System Administrator and System Customizer for the user, with Environment Maker, System Administrator and System Customizer highlighted

Publisher and solution

The publisher's prefix goes in front of the technical name (the Name field) of components such as connection references and environment variables, for example ajorg_. You can choose the display name. Choose the prefix before you create anything, because technical names cannot be changed afterwards.

Do not use the default publisher, which has a random prefix such as cr8a3. Create one publisher for the whole team or organisation. In the example it is "andersjensenorg Automation" with the prefix ajorg. A new environment only holds the built-in solutions:

The Solutions list in Power Automate in the dev environment with built-in solutions such as Power Apps Checker, Contextual Help, Common Data Services Default Solution and Default Solution, and the toolbar with New solution, Import solution and Connect to Git
  1. In Power Automate, pick the dev environment in the environment picker. Everything is built there from now on.
  2. Go to "Solutions" › "New solution".
  3. Under "Publisher", click "New publisher", enter "Display name", "Name" and "Prefix", and save.
  4. Back in the "New solution" panel, enter the "Display name" "Training Sign-up" and a "Name", select your publisher, and keep "Version" 1.0.0.0.
  5. Click "Create".
The New publisher panel with Display name andersjensenorg Automation, Name andersjensenorgautomation, Prefix ajorg, Choice value prefix 41931 and the preview ajorg_Object The New solution panel filled in with Display name Training Sign-up, Name TrainingSignup, Publisher andersjensenorg Automation and Version 1.0.0.0

Set the solution as your preferred solution, so new objects land in it. The command is in Power Apps, not in Power Automate's "Solutions" list:

  1. Go to make.powerapps.com, pick the dev environment, and open "Solutions".
  2. Choose "Set preferred solution" in the command bar.
  3. Select "Training Sign-up", and click "Apply".

An admin can also turn on the environment setting "Create new canvas apps and cloud flows in Dataverse solutions" under "Settings" › "Product" › "Features", so new flows are always solution flows. Check the setting in each environment. At the time of writing, Microsoft's documentation labels it as preview.

One solution or several

Start with one solution per thing you deploy together. Microsoft calls a single solution the simplest strategy, and several unmanaged solutions in the same dev environment make it easier to create dependencies that lock each other.

If you split up later, import the solution the others depend on first, because an import fails when a registered required component is missing. The import does not catch every dependency: Microsoft mentions a flow that uses a column from another solution, where the import succeeds but the flow fails. So test the flow after every import.

Connections and connection references

The key and the hook

A connection is a saved sign-in to a connector, and it belongs to the person who created it. It is never part of a solution. A connection reference is the hook inside the solution. When you import, you choose which connection the hook uses in the new environment.

Create the connections first:

  1. In Power Automate in dev, go to "Connections", and create a SharePoint connection and a Microsoft Teams connection.
  2. Do the same in test and production.
The Connections page in Power Automate in dev with Microsoft Teams (Dev) and SharePoint (Dev), both with the status Connected

Make the hooks yourself

Create one connection reference per connector before you build the flow, here SharePoint and Teams. Otherwise Power Automate creates them for you, named after the connector and the solution with a random suffix. One hook per connector is my recommendation. Microsoft only writes that Power Automate tries to reuse existing connection references.

  1. Open the solution, and choose "New" › "More" › "Connection reference".
  2. Enter a "Display name", for example "andersjensenorg SharePoint". The "Name" gets your prefix automatically.
  3. Choose the "Connector" and the "Connection", and click "Create".
  4. Repeat for Microsoft Teams.
The New Connection Reference panel with Display name andersjensenorg SharePoint, Name ajorg_andersjensenorgSharePoint, Connector SharePoint and Connection SharePoint (Dev) The Connection references view in the Training Sign-up solution with andersjensenorg SharePoint and andersjensenorg Teams and their technical names starting with ajorg_

This is an automatic one, created when an existing flow is added to a solution:

A solution containing Legacy reminder flow and an automatically created connection reference named SharePoint andersjensenorgmigrationdemo-71833 with the technical name ajorg_sharedsharepointonline_71833

Who can turn the flow on

The person who turns the flow on must own or have access to all its connections. After that, co-owners can turn it off and on. So let the account that owns the connections turn the flow on the first time.

SharePoint and Teams use OAuth connections, and according to Microsoft you can only share those explicitly with a service principal ("Can use"), not with a colleague. Co-owners can use the services in the flow, but cannot change the sign-in on a connection another owner created. The ownership of a connection reference cannot be changed from the Solutions area.

Environment variables

Environment variables take everything environment-specific out of the flow. Values can be at most 2,000 characters.

The New environment variable panel with the Data Type list open showing Decimal number, JSON, Text, Yes/No, Data source and Secret
TypeUse it for
Decimal numberA number
TextText, such as an email address
JSONStructured settings in one value
Yes/NoAn on/off switch. Microsoft's documentation calls it Two options
Data sourceA SharePoint site or list
SecretA value in Azure Key Vault, described below

Prepare the SharePoint lists

Each environment needs its own SharePoint site with the list. Microsoft writes that internal column names are not necessarily the same just because two lists have the same name and columns, and that metadata always matches when the whole site is copied (environment variables, data source variables). Set up the lists like this:

  1. In the dev site, create the list "Training sign-ups" with Title, Department (Choice), Course (Choice) and a Date column named PreferredDate in one word.
  2. Rename that column to "Preferred date". The internal name stays PreferredDate.
  3. On the home page of the test site, choose "+ New" › "List".
  4. In the "How would you like to start?" dialog, choose "Existing list" under "Import from".
  5. Under "Select a Team or site", pick the dev site, select "Training sign-ups", and click "Next".
  6. Enter the name "Training sign-ups", and click "Create". The new list is empty and has the same columns, views, formatting and Choice values as the dev list.
  7. Repeat on the production site.
  8. In all three lists, open each column under "List settings", and check that Field= in the address is Title, Department, Course and PreferredDate.
  9. If a name differs, delete the list, and create it again from the dev list.

Create the variables

  1. Open the solution, and choose "New" › "More" › "Environment variable".
  2. Create "andersjensenorg training site": "Data source", the SharePoint connector, your connection, "Parameter Type" "Site", and the dev site as current value.
  3. Create "andersjensenorg training list" the same way with "Parameter Type" "List", select the site variable under "Site", and pick "Training sign-ups".
  4. Create "andersjensenorg training notification recipient" as "Text", with the recipient's email address as current value.
The New environment variable panel for andersjensenorg training site with Data Type Data source, Connector SharePoint, Connection SharePoint (Dev), Parameter Type Site, the dev site as Current site and Export value set to No under Advanced The New environment variable panel for andersjensenorg training list with Parameter Type List, Site set to the andersjensenorg training site variable and Training sign-ups as Current list The New environment variable panel for andersjensenorg training notification recipient with Data Type Text, an empty Default Value, an email address as Current Value and Export value set to No

Keep dev values out of test

The current value wins over the default value. If the dev value travels with the solution, the flow in test points to the dev list. Microsoft's guidance is to remove the current value from the solution before you export.

The panel also has an "Export value" toggle, which says the current value will be removed from the exported file. Do not rely on "Export value" alone: Values recreated via the Default Solution get "Yes", and the list variable's panel does not save "No" while its "Site" field is empty. So do this:

  1. Before you export, choose "Current Value" › "…" › "Remove from this solution" on each variable.
  2. After the export, open the zip file.
  3. Look for files named environmentvariablevalues.json. If they are there, the dev values travel with the solution.
The Advanced section of an environment variable with the Export value toggle set to No, the text that the current value will be removed from the exported solution file, and Delete from this environment

If you change a value directly in an environment, the flow keeps the old value until it is saved or turned off and on, which can take up to an hour.

Secret variables

A Secret variable gets its value from Azure Key Vault, the only supported store. It requires the resource provider Microsoft.PowerPlatform, the role Key Vault Secrets User and a key vault in the same tenant. Secrets are not in dynamic content: The flow reads the value with a Dataverse action (setup guide).

Build the flow in the solution

Before you start: The Teams action needs the Workflows app (formerly Power Automate) to be available and allowed in the Teams admin center. If it is blocked, the action fails even though the connection exists.

  1. Open the solution, and choose "New" › "Automation" › "Cloud flow" › "Automated".
  2. Pick the SharePoint trigger "When an item is created", and click "Create". The classic designer opens, with only "Save". Environment variables appear in dynamic content only after the flow is saved.
  3. Fill in temporary values: The dev site's address in "Site Address", the list in "List Name", and the Teams action "Post message in a chat or channel" with Post as "Flow bot", Post in "Chat with Flow bot", your own address as recipient and temporary text in "Message". Click "Save".
  4. The classic designer has no switch to the new one. Open the flow's address with ?v3=true at the end.
  5. In "Site Address" and "List Name", choose "Enter custom value", type /, choose "Insert dynamic content", and insert the two environment variables. They are under "Parameters".
  6. Recipient is a people picker. Click the gear icon next to it, choose "Use dynamic content", and swap your address for the recipient variable.
  7. Replace the temporary text in "Message" with "Title" (the name), "Course" and "Preferred date" from the trigger.
  8. Click "Save draft", and then "Publish".
  9. Create a test item in the dev list.
  10. Check that the run shows as "Succeeded" and that the message has arrived in Teams.
The SharePoint trigger When an item is created in the new designer, with environment variables in Site Address and List Name and a tooltip showing the expression parameters('andersjensenorg training site (ajorg_andersjensenorgtrainingsite)') The Post message in a chat or channel action with the dynamic content panel open, showing the group Parameters with the three andersjensenorg environment variables for list, site and notification recipient The finished two-step flow in the designer with the Teams action posting as Flow bot, the recipient variable in Recipient, a message with Title, Course Value and Preferred date, and Save draft, Test and Publish in the command bar

A draft does not run until it is published, and an export only includes published components. Solution flows also get a version history, where you can restore an earlier version as a draft.

The details page for Training sign-up notification with Status On, Type Automated, the plan text This flow runs on owner's plan, and a 28-day run history with one Succeeded run

The solution now holds the flow, two connection references and three environment variables. The references and variables have ajorg_ in their technical names.

All objects in the Training Sign-up solution with two connection references, three environment variables and the cloud flow Training sign-up notification, and technical names starting with ajorg_

If you already have flows outside a solution

Flows made under Create in Power Automate, like the one in the guide to sending Granola summaries to Teams, often live outside a solution, especially in the default environment. There are two situations.

1. The flow is in dev, but outside a solution.

  1. Open the solution, and choose "Add existing" › "Automation" › "Cloud flow".
  2. Select the flow on the "Outside Dataverse" tab, and add it. Not every flow can be added.
  3. Check which connection references the flow uses. Power Automate creates an automatic connection reference when the flow is added, as in the image above. Use "Change connection reference" in the trigger and each action to choose your own.
  4. Replace fixed addresses with environment variables, publish the flow, and run it once.
  5. If the flow has also landed in another solution than the one you will export, remove it from that one with "Remove" › "Remove from this solution". This happens when another solution is set as preferred.
The Add existing cloud flows panel on the Outside Dataverse tab with Legacy reminder flow selected

2. The flow is in the default environment and in use.

  1. Open the flow in the default environment, and choose "Save As". The dialog says "It'll be turned off by default". Check that the copy is "Off".
  2. Create an unmanaged solution with your publisher in the default environment. Add only the copy with "Add existing" › "Automation" › "Cloud flow" › "Outside Dataverse". Power Automate creates a connection reference by itself. Do not turn the copy on in the default environment.
  3. Export the solution as "Unmanaged". The copy stays "Off".
  4. Import the solution into dev, and choose the dev connection under "Connections". The flow is "Off" after the import.
  5. Switch the flow to dev resources: Your connection reference, and environment variables instead of fixed addresses. Only then turn it on, and run a test with made-up data.
  6. Deploy to test, and check the flow against test's own resources.
  7. In production: Pause new sign-ups, wait for all runs of the original flow to finish, and turn the original off. Deploy, check that the new flow is "On", send a test item through, and resume sign-ups.
  8. Delete the original once the new flow has run without errors.

The order in step 7 matters, because the import can turn the new flow on by itself.

Unmanaged and managed: Move the solution manually

Use unmanaged in dev, where you build, and managed everywhere else. A managed solution cannot be exported. If you delete one, all its components are removed, and data in its own tables and columns is lost.

Start with solution checker:

  1. In "Solutions", choose "…" next to the solution › "Solution checker" › "Run".
  2. When it has finished, choose "View results".
Solution checker results for Training Sign-up with no issues listed, and the solution menu with Overview, Objects, History, Pipelines and Source control

Export from dev

  1. Select the solution, and choose "Export solution".
  2. Under "Before you export", click "Publish".
  3. Click "Next", keep the suggested version number (1.0.0.1), and choose "Managed (recommended)".
  4. Click "Export", and then "Download" when the export has succeeded.
The Before you export panel with Publish all changes and a Publish button, and a box suggesting a pipeline instead with Start the deployment process

The first step also suggests a pipeline, and the next step has a checkbox for solution checker:

The Export this solution panel with Current version 1.0.0.0, the suggested Version number 1.0.0.1, Managed (recommended) selected and the checkbox Run solution checker on export

Import into test

  1. Switch to the test environment, and choose "Solutions" › "Import solution" › "Browse".
  2. Select the file, and click "Next".
  3. Choose connections for the connection references.
  4. Fill in the environment variables with test values. The site dropdown only lists sites you have visited, so type the site's URL if it is missing.
  5. Click "Import".
  6. On the flow's page, check that it is "On".
  7. Create an item in the test list, and check that the message arrives in Teams.

Next to the two connection references, the connections step asks for a SharePoint connection "Required for Environment Variables of type Data source SharePoint".

The Connections step of Import a solution in andersjensenorg - Test with 3 updates needed for the andersjensenorg SharePoint and andersjensenorg Teams connection references and a SharePoint connection required for environment variables of type Data source SharePoint, all with green checks

Variables without a value ask for one. A typed site URL can show a warning that you do not have access to the site value. The warning does not stop the import.

The Environment Variables step of Import a solution with the recipient address, the test site URL with a red warning about site access, and Training sign-ups selected as the list The Solutions list in andersjensenorg - Test with Training Sign-up at version 1.0.0.1, Managed set to Yes and andersjensenorg Automation as publisher

The import tries to put flows in the same state as at export. If the flow was on and every connection reference gets a connection, it should be turned on. Whoever imports becomes the owner of everything in the solution. An import without errors only proves the package arrived.

Never fix directly in test or production

A change to a managed component is stored as an unmanaged layer on top of the solution. The top layer decides what runs, so the change keeps applying after the next deployment. Microsoft writes that managed components cannot be edited inside the managed solution.

The new designer blocks editing the managed flow, but the classic designer allows it, with a banner saying the edit creates a new unmanaged layer. You see the layers on the flow under "Advanced" › "See solution layers":

Solution Layers for Training sign-up notification in test with an active Unmanaged layer from the default publisher at order 2 on top of the TrainingSignup layer from andersjensenorg Automation at order 1

To remove the layer:

  1. In the solution, go to "Objects" › "Cloud flows", and select the flow.
  2. Choose "Advanced" › "Remove active customizations", and confirm.

It cannot be undone, and afterwards the flow runs as the managed solution says.

The next version: Update a solution you have already deployed

  1. Make the change in dev, and publish the flow.
  2. Export the solution as managed with a higher version number. The format is major.minor.build.revision, and the new version must be higher than the one in the target.
  3. Import the file in the target. The details show "Current version installed" and "Version contained in the update".
  4. Under "Advanced settings", choose one of the three solution actions in the table below, and click "Import".
  5. Check that the flow is "On", and create a test item.

The three actions:

ActionWhat it doesUse it when
Upgrade (default)Upgrades and deletes components that are no longer in the solutionAlmost always. The target ends up like dev
Stage for upgradeInstalls the new version next to the old one and waits to delete until you choose "Apply Solution Upgrade"You need to move data before the old parts go
UpdateReplaces with the new version, but leaves removed components behindRarely. It is fastest, but test and production can drift from dev
The Import a solution details for TrainingSignup with Current version installed 1.0.0.1 and Version contained in the update 1.0.0.2, and Advanced settings with the solution actions Upgrade, Stage for upgrade and Update and the checkbox Enable Plugin steps and flows included in the solution

Microsoft's pages describe the flow's state differently. The page on updating solutions says the checkbox "Enable Plugin steps and flows included in the solution" turns the solution's flows on after the import. The older page on importing flows says an update does not change whether an existing flow is on. A yellow message about flows that may not be on can appear even when the flow is "On".

Microsoft's pages disagree on patches: The page on solution concepts recommends them for small updates, while the pages on layers and updates advise against them. Use full upgrades to keep team development and source control simple.

Pipelines in Power Platform

Pipelines automate the two previous sections from inside Power Automate or Power Apps. They always deploy managed solutions and always use Upgrade, and both the managed and the unmanaged version are stored in the pipeline host at every deployment.

What Pipelines require

  • Dataverse: In every environment in the pipeline.
  • Managed Environments for targets: Test and production must be managed. The host does not have to be.
  • Development environment: Microsoft's pages differ. The Pipelines page still exempts developer environments from Managed Environments and standalone licences, although unmanaged ones are being phased out, and says "all other environments used in pipelines" must be managed. The platform host and custom host pages only require it for targets. A Sandbox dev environment that is not managed works with the platform host.
  • Licences: Every managed environment requires licences with premium use rights, and in Microsoft's example a production target requires a standalone licence.
  • Enforcement: Since October 2026, admins are notified when a pipeline deploys to a target that is not managed. They then have 30 days, plus one 30-day extension per environment, before deployments to that target are blocked.

Platform host or custom host

With the platform host, a maker can create a personal pipeline without an admin. The target list only shows environments the maker can already import to. A personal pipeline has at most three environments (dev and two targets), cannot be shared and cannot be extended. The platform host is created the first time someone in the tenant opens Pipelines.

The host sits in the tenant's home region. If your environments are elsewhere, an admin must turn on "Cross-Geo Solution Deployment". A custom host is the admin's central setup with shared pipelines, more environments and the roles Deployment Pipeline Administrator, Maker and User.

Create and run a pipeline

  1. Open the solution in dev, and choose "Pipelines" › "Create pipeline".
  2. Enter a name and description, choose test as "Target Environment", and save. The first stage is named after the environment.
  3. Choose "Add stage", name it "Production", and choose the production environment.
  4. Click "Deploy here" on the test stage, and choose "Now" or "Later".
  5. Wait for the validation.
  6. Check connections and environment variables. If the site and list show dev values marked "Solution value", change them to the target's own.
  7. Check the deployment notes in the summary, and click "Deploy".
  8. Follow the deployment under "Run history".
  9. Create an item in that environment's list, and check that the message arrives in Teams.
  10. Repeat steps 4 to 9 on the production stage.
The Pipelines page in the Training Sign-up solution with the Create pipeline panel open: Name Training Sign-up pipeline, a description, Source Environment andersjensenorg - Dev and andersjensenorg - Test selected as Target Environment

Stages run in order, and the version deployed to test goes to production. "Deploy here" on the production stage is greyed out until test is deployed, and the version cannot be edited there.

The Training Sign-up pipeline with Development at solution version 1.0.0.3, the andersjensenorg - Test stage showing 1.0.0.3 as last successfully installed version, the Production stage, and Deploy here buttons on both stages

When dev values travel in the solution, the pipeline pre-fills them:

The Environment Variables step of a pipeline deployment to test, where andersjensenorg training site is pre-filled with andersjensenorg Training Dev and andersjensenorg training list with the dev list marked Solution value

The "Destination" step announces an AI-generated description, and the "Summary" step pre-fills the deployment notes with AI text, plus "Clear" and "Create notes using AI".

The Summary step of Deploying Solution for the Production stage with Version 1.0.0.3, Publisher andersjensenorg Automation, Prefix ajorg and hand-written deployment notes, plus the button Create notes using AI Run history for the Training Sign-up pipeline with two Succeeded deployments of version 1.0.0.3, one to andersjensenorg - Test and one to the Production stage

Limits

  • One solution per deployment.
  • Same tenant only.
  • No unmanaged deployments.
  • Rollback: An earlier version can be redeployed from "Run history" if "Allow redeployments of older versions" is on. It overwrites the newest version and cannot be undone.

For approvals, Pipelines offer delegated deployments, which run as a service principal or the stage owner and always wait for approval. Run as the stage owner, they cannot deploy connection references to OAuth connections like the example's.

When you grow: Git, Azure DevOps and GitHub

Git integration stores the solution as code in Azure DevOps or GitHub. Microsoft writes that it belongs in development environments, and that both development and target environments must be Managed Environments. At the time of writing, the GitHub connection is in preview.

"Connect to Git" in the toolbar of the "Solutions" list opens a panel for Azure DevOps. It says that connecting turns on Managed Environments, so it is not a free click in dev.

The Connect to Git panel for Azure DevOps with the note that connecting to Git will turn on Managed Environments for this environment, Connection type Environment or Solution, and Organization, Project and Repository fields

Pipelines can be extended to GitHub and other systems, and everything can be built with Power Platform Build Tools for Azure DevOps or with GitHub Actions. A deployment settings file, created with pac solution create-settings, holds connection references and environment variables per environment as JSON, and Build Tools use it at import.

Ownership and service principal

Three things depend on the owner:

  • Ownership: Who can edit and manage the flow.
  • Licence: The flow runs on the owner's plan.
  • Connections: The sign-ins the actions use.

When the owner leaves, an extra co-owner saves the ownership, not the licence or the connections (see the FAQ).

Add a group as co-owner

  1. On the flow's page, click "Share" next to "Co-owners".
  2. Search for the group, and select it. A Microsoft 365 group works.
  3. Read the dialog, which says co-owners get to use the flow's connections, and confirm.
The Co-owners page for Training sign-up notification with the heading Add a system user or team as an owner, the user Anders Jensen and the group andersjensenorg Automation Owners, and the connection references in use for Teams and SharePoint

Outside the default environment, group members do not automatically get the Environment Maker role, so what they can do depends on the roles they already have.

Change the owner

An owner or co-owner with the right permission can change the owner of a solution flow, and the old and new owner both become co-owners:

  1. On the flow's page, choose "Set primary owner" on the "Co-owner" card.
  2. Choose the new owner under "Primary owner", and click "Save".
  3. Confirm in the "Change owner?" dialog.

An admin finds flows with no owner in the Power Platform admin center under the environment's "Resources" › "Flows".

A service principal as owner

A service principal is an application identity in Microsoft Entra ID, added to the environment as an application user. Microsoft recommends it as flow owner rather than a shared service account, because shared passwords are a security risk.

Before you start: Settle and document the licence for the flow (see the licence question below).

  1. Create an app registration in Microsoft Entra ID. Owning the flow does not require a client secret.
  2. In the Power Platform admin center, open the production environment, and go to "Settings" › "Users + permissions" › "Application users" › "New app user".
  3. Add the app, choose the business unit and a role such as System Customizer, and click "Create".
  4. On the flow's page, make the service principal primary owner.
  5. Create a test item in the production list, and check that the run shows "Succeeded" and the Teams message arrives.
Application users in andersjensenorg - Production with the confirmation that andersjensenorg Automation SP has been added, shown with a hash sign in front of the name, state Active and one security role The flow details page with andersjensenorg Automation SP as Primary owner, Status On, the plan text This flow runs on owner's plan, a Succeeded run and the SharePoint and Teams connection references still using the user's connections

If you switch the owner back to a user, the service principal stays on the list of co-owners. If it should not keep access:

  1. On the flow's page, click "Share" next to "Co-owners".
  2. Remove the service principal.

SharePoint and Teams still sign in through the user connections that the connection references point to. Create those with an account that does not leave with an employee and only has the permissions the flow needs.

Microsoft's pages differ on sharing those connections with the service principal. The page on service principals says sharing is not required for a solution flow, while the page on changing owners lists sharing as a general step. A solution flow runs with the service principal as owner without the sharing.

The licence question

A service principal cannot hold a licence. If it owns a flow with premium connectors, the flow needs a Process or per flow licence, a flow group with a Process licence or a designated licensed user. Flows with only standard connectors are exempt from that requirement.

The requirement for Managed Environments is on another page, which does not mention service principals. So settle the licence first. A successful run right after the change proves little: Moving to the new owner's licence can take up to seven days, and a flow whose new owner lacks a needed premium licence runs for 30 days and is then turned off.

Licensing in brief

For prices, see Microsoft's Power Platform licensing guide.

  • Power Automate Premium per user: Standard, premium and custom connectors.
  • Power Automate Process per flow: Gives the flow its own rights regardless of the owner's licence. The flow must be in a solution first.
  • Managed Environments: Every user running a cloud flow in a managed environment needs Power Apps Premium, Power Automate Premium or a qualifying Dynamics 365 licence, or the environment needs a per flow plan allocated. Microsoft has only dated the block for apps: From February 2027, users without a licence cannot open apps in a managed environment.
  • Action limits: From April 2027, a phased rollout ends the transition period for cloud flows under user licences, and the published per-user limits apply. Existing Process and per flow allocations are not affected.

So even this example, with only standard connectors, needs a premium licence or per flow capacity once it runs in managed test and production.

Governance and monitoring

Data policies

Data policies (DLP policies) sort connectors into Business, Non-business and Blocked. Connectors in different groups cannot be combined in one flow, and an environment policy cannot override a tenant policy. They sit in the Power Platform admin center under "Security" › "Data and privacy" › "Data policy".

The Prebuilt connectors step of a new data policy with the Business tab selected, holding SharePoint and Microsoft Teams, both Standard connectors from Microsoft

Managed Environments

Managed Environments add control per environment, for example sharing limits, usage insights, solution checker enforcement, Pipelines and export to Application Insights. Turning them on requires the Power Platform Administrator or Dynamics 365 Administrator role:

  1. In the Power Platform admin center, go to "Manage" › "Environments" › "…" next to the environment › "Enable Managed Environments".
  2. Read the panel. It says a licence auto-claim policy will be created for the tenant if none exists, so tell whoever manages licences in Microsoft 365.
  3. Click "Enable".
The Enable Managed Environments panel for andersjensenorg - Test with licensing details, an auto-claim note, Manage sharing, and Solution checker enforcement set to Warn

Solution checker and blocking direct changes

Solution checker is a static check against Microsoft's rules for unmanaged solutions. In managed environments it can be set to None, Warn or Block at import, and it does not guarantee a successful import.

The environment setting "Block unmanaged customizations" stops changes directly in the environment, which enforces the rule about never fixing in production. Flows can still be turned on and off, and environment variables can still be changed. It is off by default, under "Settings" › "Product" › "Features".

Monitoring

Run history is kept for 30 days (limits page). The flow's details page calls the list "28-day run history". Flows not triggered for 90 days can be turned off, with a warning to the owners 30 days before, unless the owner has a premium licence or the flow has a Process licence. Flows that fail constantly are turned off after 14 days.

WhereWhat you seeKeep in mind
The flow's run historyEvery detail of each run30 days
The FlowRun table in DataverseKey data for runs of solution flows. Automation center builds on it28 days by default. Longer retention uses Dataverse database capacity. Microsoft writes that records can be skipped, so it is not a complete audit trail
Application InsightsTelemetry for alerts and dashboardsRequires Managed Environments. Microsoft writes that small data losses can occur

Apps, agents and desktop flows: The same method

Canvas apps, Copilot Studio agents and desktop flows can live in the same kind of solution and move with export and import or Pipelines.

Copilot Studio creates agents in a default solution. To move an agent, put it in your own solution, and add components you give the agent later in Copilot Studio to the solution before you export. Building the agent itself is covered in build your first agent in the new Copilot Studio. For desktop flows, Microsoft's role overview lists System Customizer as the role that can create them.

Common pitfalls

  1. Flows in the Default Solution. It cannot be exported.
  2. The default publisher. Its random prefix ends up in every technical name.
  3. Automatic connection references with random names.
  4. Dev values travel to test. Remove current values before export.
  5. Fixes directly in production. They stay as a layer on top of the next deployment.
  6. The SharePoint list is missing in test, or its internal column names differ. The import succeeds, but the flow fails.
  7. No licence for flows in managed test and production. It is required even with standard connectors.
  8. One person owns every production flow.
  9. The flow will not turn on after import. The person turning it on lacks access to a connection.
  10. "Update" chosen at import. Deleted parts stay behind in test and production.

Checklist

  • Dev, test and production with Dataverse. Test and production as Managed Environments.
  • Your own publisher, prefix and preferred solution.
  • One connection reference per connector, and environment variables for everything that differs per environment, with no current values in the export.
  • Sites, lists and connections ready in test and production, with the lists copied from the dev list.
  • Solution checker without critical issues.
  • A pipeline with test and production as targets, or a manual export as managed.
  • A new version number for every deployment, and Upgrade at import.
  • Target values checked for every environment variable, the flow On and a test item through after every deployment.
  • A service principal as owner in production, or at least one more co-owner.
  • A licence for flows in managed environments, and Process where required.
  • A data policy that allows the flow's connectors.
  • Your own log, FlowRun or Application Insights, if history must be kept beyond 30 days.

My recommendation

Start with three environments, one publisher, one solution and Pipelines with the platform host. That is enough for most teams.

Spend your effort on connection references, environment variables and ownership from the first flow. They cause the trouble when a flow moves, and are much harder to add later.

Wait until you have several developers or need code review before you introduce Git and Azure DevOps. Managed Environments need flow licences in test and production, so work out the cost before you choose Pipelines.

Frequently asked questions

What is the difference between a connection and a connection reference?

A connection is the sign-in itself, for example your SharePoint account, and it never travels with a solution. A connection reference lives inside the solution and points to a connection. When you import the solution into a new environment, you choose which connection it should point to there.

What is the difference between a managed and an unmanaged solution?

An unmanaged solution is the one you build and edit in, and it belongs in dev. A managed solution is the finished package you export to test and production. It cannot be exported again, and if you delete it, everything it contains is removed.

Do Power Platform pipelines require Managed Environments?

Yes, for the target environments. Test and production must be Managed Environments, while the host does not have to be. Microsoft's pages differ on the dev environment, but a Sandbox dev environment that is not managed works with the platform host. Flows in a managed environment must be covered by a premium licence or by per flow capacity.

Can I edit a flow directly in production?

You should not. The change is stored as an unmanaged layer on top of the solution and keeps winning, even after you deploy a new version. Make the change in dev, and deploy a new version.

What is the difference between Upgrade and Update when I import a new version?

Upgrade is the default. It updates the solution and deletes the parts you have removed in dev. Update also updates, but leaves removed parts behind in the target environment. Pipelines always use Upgrade.

What happens to a flow when the owner leaves?

Microsoft's licensing FAQ says the flow is downgraded, the owners are notified, and the flow is turned off after 14 days if nobody acts. Microsoft's page on shared flows says a flow with another active owner keeps running, but actions that use the departed owner's connections can fail. So a co-owner saves the ownership, while the licence and the connections need their own solution.

How long does Power Automate keep run history?

For 30 days from the start of the run. If you need to look further back, solution flows can store the key data of each run in Dataverse, the flow can write to its own log, or you can send telemetry to Application Insights, which requires Managed Environments.

How do I move a flow that is not in a solution?

Open a solution in the same environment, and choose "Add existing" › "Automation" › "Cloud flow" and the "Outside Dataverse" tab. Add the flow, and make sure it uses your own connection references. Then export the solution and import it in the next environment. If the flow is in use, move a copy that is turned off, and turn off the original before the new one goes live.

For the full picture, Microsoft's overview of ALM in Power Platform and overview of Pipelines are the primary sources.

Your own setup will raise questions this guide does not cover. Microsoft Power Automate Professionals is an active LinkedIn group where people who build flows every day ask and answer exactly those questions.

Comments

No comments yet. Write the first one.

Write a comment

Your name and comment are shown publicly once approved. Your email is not shown. Read more in the privacy policy. Once approved, the comment may be machine-translated for the other language version. The original is always available.

More articles

  • Granola API + Power Automate: Send the summary to Teams

    Granola writes the summary, but it stays inside Granola. Build a flow that pulls the latest note through the API and posts it in Microsoft Teams.

    Read more →
  • How to use RegEx in Power Automate

    How to use Regular Expressions in Power Automate: Build patterns, test them, and extract structured data from emails and documents in your cloud flows.

    Read more →
  • Microsoft Power Automate: Tutorial for beginners [2021]

    Complete Power Automate tutorial for beginners: Build your first cloud flows step by step with triggers, actions, conditions, and real-world examples.

    Read more →