A few months after Power Apps and Power Automate are opened up for use, the picture is always the same: hundreds of apps and flows in the default environment with no clear author, connections tied to personal accounts, processes that stop the morning an employee leaves. The tool isn’t broken. Governance wasn’t set up from the start. Below, in the order we apply in the field, we explain the environment structure for controlled growth of low-code assets, solution-based application lifecycle management (ALM), connector DLP policies and managing apps that become ownerless.
The problems with the default environment
Every Power Platform tenant has a default environment, and it can’t be deleted. Every licensed user can create apps and flows here; many flows started from Teams and SharePoint also land here automatically. It’s handy for personal productivity. For corporate business applications, however, it carries several structural risks:
- There’s no separation: Development and use happen in the same place. There’s no stage that prevents a change from reaching live users without testing. A “small fix” made on Friday evening affects the whole department on Monday morning.
- Ownership is personal: Apps and connections are tied to the user who created them. When the user leaves, flows stop with authentication errors.
- The inventory is unclear: It’s impossible to tell which app carries daily work and which is an experiment.
- DLP has to apply to the widest audience: In an environment where everyone works, a restrictive policy also blocks legitimate personal use.
The goal isn’t to ban the default environment; it’s to position it as a “personal productivity” area and move corporate business applications to separate environments.
Environment types and the recommended structure
Besides the default, Power Platform has production, sandbox, developer, trial and Dataverse for Teams environments. Sandbox environments support test operations such as copy, reset and administration mode; developer environments are personal workspaces belonging to a single user.
| Medium | Type | Who writes | What it contains |
|---|---|---|---|
| Default | Default | All licensed users | Personal productivity flows, experiments |
| Development | Sandbox or developer | App team | Unmanaged solutions |
| Test | Sandbox | Deployment account only | Managed solutions, test data |
| Production | Production | Deployment account only | Managed solutions, real data |
Opening a separate trio of environments for each app multiplies the management load. Usually grouping by business area (for example separate development–test–production sets for “Operations”, “HR” and “Finance”) plus the default environment for personal use is enough. If data separation between environments is needed (for example HR data), a separate set becomes mandatory. The choice of source between Dataverse and SharePoint affects this decision; we covered the details in the Dataverse or SharePoint list article.
To protect the structure, make two tenant settings on day one: in the Power Platform admin center, give the right to create production and sandbox environments only to admins, and restrict trial environment creation too. If you don’t, the number of environments grows uncontrollably just like the number of apps. If your license coverage allows it, the Managed Environments feature provides additional controls such as sharing limits, usage insights and environment routing, which directs developers to personal developer environments.
Solutions, connection references and environment variables
Portability between environments is provided by the solution. A solution holds apps, flows, Dataverse tables, security roles and related components as a single package. Apps and flows created outside a solution can’t be moved reliably between environments. The picture we see most often in the field is an app that grew outside a solution for months, can’t be moved to the test environment and is rebuilt by hand. The rule is simple: in the development environment, everything is created inside a solution.
Unmanaged and managed solutions
In the development environment, the solution is edited as unmanaged. It’s exported and imported into test and production as managed. A managed solution can’t be edited directly in the target environment; this prevents off-the-record changes of the “I made a quick fix” kind in production, and ensures components are removed cleanly when the solution is uninstalled. Production isn’t a place for editing.
Connection references
Flows and apps should connect to connectors through a connection reference, not a direct connection. The reference is part of the solution; the actual connection is created separately in each environment. That way, flows in production run with the connection of the service account defined for that environment, not the developer’s personal account. When the developer goes on leave, the flow doesn’t stop.
Environment variables
Values that change from environment to environment (SharePoint site address, list name, approver email, API endpoint) aren’t hard-coded into formulas or flow steps. Environment variables define these values within the solution, with a different value given in each environment. A flow in test that writes to the production list is the classic result of a hard-coded address. For secrets, a secret-type environment variable referencing Azure Key Vault can be used.
The flow from development to production
Moving can be done by hand; but for repeatability, use the Power Platform CLI (pac), pipelines in Power Platform, or Power Platform Build Tools on Azure DevOps/GitHub. The example below shows the basic flow with pac; the environment addresses and solution name are examples.
# Authenticate to the development environment
pac auth create --name dev --environment https://contoso-dev.crm4.dynamics.com
# Export the solution as managed
pac solution export --name RequestManagement --path ./RequestManagement_managed.zip --managed
# Generate a settings file for connection references and environment variables
pac solution create-settings --solution-zip ./RequestManagement_managed.zip --settings-file ./prod.settings.json
# (fill in the values in prod.settings.json for the production environment)
# Switch to the production environment and import
pac auth create --name prod --environment https://contoso-prod.crm4.dynamics.com
pac solution import --path ./RequestManagement_managed.zip --settings-file ./prod.settings.json
The flow we recommend is this:
- The developer works on the unmanaged solution in the development environment. The solution can also be saved to source control (Git) unpacked with
pac solution unpack; changes become traceable. - When the release is ready, the solution version number is incremented and the managed package is produced.
- The package is imported into the test environment with its settings file; the business unit validates test scenarios with a realistic data volume.
- After approval, the same package is moved to production with the production settings file. Imports into test and production are done not with personal accounts but with a deployment account or service principal.
Track approvals and version transitions of flows taken into production with IT change and configuration management records.
In testing, not only function but also performance should be checked. Delegation problems that don’t show in a development environment working with little data appear in testing, and they should. For these checks, you can use the checklist in the Power Apps delegation and performance guide.
Connector DLP policies
Data loss prevention (DLP) policies divide connectors into three groups: Business, Non-business and Blocked. An app or flow can’t use connectors from both the Business and Non-business groups at the same time; those in the Blocked group can’t be used at all. This prevents, for example, SharePoint and Dataverse data from being moved to personal cloud storage or social media connectors. Some core Microsoft connectors can’t be blocked; they can only be put in the Business or Non-business group.
- Tenant-level baseline policy: Applied to all environments, especially the default environment. Puts corporate data connectors in the Business group and blocks risky connectors.
- Environment-level policy: Allows an additional connector a specific business area needs (for example a custom connector for the ERP, or HTTP) only in that environment.
- HTTP and custom connectors: The HTTP connector can send data to any endpoint. It should be blocked in the default environment and opened only in the environment that needs it. Custom connectors can be classified with URL patterns.
Managing ownerless apps and flows
When an employee leaves, their account is disabled; the apps and flows they own become ownerless. If flows run with personal connections, they stop, often until someone notices. The permanent fix is to run corporate apps in solutions with service account connections. For existing assets in the default environment, however, a regular process is needed.
With the admin PowerShell module (Microsoft.PowerApps.Administration.PowerShell), ownership is reported and transferred:
Add-PowerAppsAccount
# List the apps in an environment with their owners
Get-AdminPowerApp -EnvironmentName <environment-id> |
Select-Object DisplayName, AppName, @{n='Owner';e={$_.Owner.email}}
# Transfer ownership of the app to a new user
Set-AdminPowerAppOwner -EnvironmentName <environment-id> -AppName <app-id> -AppOwner <new-owner-objectid>
# Add a second owner to a flow
Set-AdminFlowOwnerRole -EnvironmentName <environment-id> -FlowName <flow-id> -PrincipalType User -PrincipalObjectId <user-objectid> -RoleName CanEdit
For a more comprehensive inventory and automatic notifications, Microsoft’s Center of Excellence (CoE) Starter Kit can be used. As a process, this checklist is an adequate start:
- Every app and flow carrying daily work has at least two owners; one of the owners is a team or service account.
- When a departure notice comes from HR, the apps and flows owned by the user are listed and handed over. Before the account is closed, not after.
- Apps that haven’t been used for a certain time are reported to their owner; if there’s no response, they’re archived.
- Flows in production use connection references and a service account, not personal connections.
- Requests for new environments are taken through a form; the purpose, owner and data class are recorded.
The design of individual processes such as approval flows sits within this governance model; for an example design, see the designing approval processes with Power Automate article. For setting up the environment structure, DLP and the ALM model, you can review our low-code and no-code solution consulting page. The reference for a detailed ALM guide is Microsoft’s Power Platform ALM documentation.
Frequently asked questions
Can I shut down the default environment completely?
The default environment can’t be deleted. The right approach is to use it as a personal productivity area, apply a restrictive DLP policy and move corporate apps to separate development, test and production environments.
Do I need a separate environment for every Power App?
No. Usually sets of development, test and production environments grouped by business area are enough. A separate environment is opened when data separation, a different DLP requirement or an independent release schedule is needed.
Can I edit a managed solution in production?
The components of a managed solution can’t be edited directly in the target environment; this is deliberate protection. The change is made in the unmanaged solution in the development environment, the version is incremented and the new managed package is moved to production after testing.
Does a DLP policy break existing flows?
A new or more restrictive policy can suspend flows that use a combination of connectors that violates the rule. Before applying the policy, extract the assets that will be affected from the inventory, share them with their owners and, if necessary, define an environment-level exception for the relevant business area.