So often people edit apps and flows in production environments just to make them work. In this post I will look at why you shouldn’t and how to disable editing.
Managed vs unmanaged solutions
Within the Power Platform we have managed and unmanaged solutions. And you migth already know that managed solutions stop you from making modifications to some things in solutions, however deploying managed solutions doesn’t stop anybody from editing your flows and apps.
If you don’t know the difference between managed and unmanaged solutions then please have a look through the Microsoft documentation on this subject.
Exporting and deploying a managed solution
Once I’ve exported my solution as a managed solution I can see version 1.0.0.3 in my solution store of my envrionment
When I open this solution i can se that I have an app and a flow inside:
And there is even a yellow warning telling me:
You cannot directly edit the components within a managed solution. If the managed properties for solution components are set to allow customization, you can edit them from another unmanaged solution
First of all I would question if the message is right as we will see further down this post.
Editing the flow
I’m going to open my flow and then using the Edit option I’m going to edit my flow. Notice i’m in my production environment where I deployed my managed solution.
I can now make a change to my flow and my flow can be saved.
And when i look at the solution layers of my flow I will see quite quickly the start of future trouble.
Within the Solutions layers we now have an unmanaged layer.
Unmanaged layers
Unmanaged layers are updates that are made as part of the default solution. When we open the default solution we will see that our test flow is included there.
Another important thing to note is that when you update your flows through the next version of a managed solution the unmanaged layer will remain in place. leaving you with the feeling that the solution is failing to deploy.
So, how do we avoid these unmanaged layers and how do we disable editing of flows (and apps).
Disable Editing of flows and apps
We will have to go back to the unmanaged version of the solution in our development environment. Then find the flows and apps in the solution and select Managed properties.
Then we will see a pane appear with all the managed properties available. The Allow customizations managed property is the one that you want to disable.
After customizations have been disabled and you export and import your solution again, you will find that you can edit your flow but you can’t save the flow. you will see the following message appear when you try to save your flow:
Flow process ‘e2a54582-4378-ec11-8d21-6045bd0f24d1’ cannot be updated because the managed properties of this solution component do not allow customizations.
Now all there is left to do is remove that unmanaged layer that someone might have created and we have an healthy solution.
Avoid the need for editing flows and apps
So far we have seen that it is possible to disable editing of flows and apps, but very often I find people editing flows (less often for apps) to make them work in an environment. Especially flow makers whio are less focused on solutions based development.
Therefore I thought that it would be useful to give a few tips and tricks on how to make your flows working multiple environments without there being a need for editing them.
- Avoid any hard coded environment specifics
- Use Environment variables ( e.g. if you point towards a SharePoint site and list)
- Develop your flows with multiple environments in mind
- Deploy your solutions frequently so that any hard coded elements are identified early on.
Discover more from SharePains by Microsoft MVP Pieter Veenstra
Subscribe to get the latest posts sent to your email.
When I use environment variables for my SharePoint sites and lists, and I edit the Canvas app within imported solution shows references to development site lists when I hover on them on the connection in the editor. Where do you think i was doing wrong?
1. I removed the association of the site or list from the solution before the export
2. It prompts me for connections and sites/lists during the import. It imports successfully.
Wondering where did I mess it up? Should it work the way I did?
Hi Ramesh,
You should not need to edit the app if you make the app use environment variables. Then all you need to do during the initial deployment is update the values of the environment variables.
Hi, Pieter,
even if we turn off “allow customizations” option, we can still see the flow logic from managed solution. Is there anyway to hide this?
Thank you.
Hi Robin,
You can secure the data.
More on this in the following post:
https://sharepains.com/2020/01/30/secure-input-output-flows-power-automate/
Hi Pieter,
Thank you for the suggestion. Although, this does not help me in this scenario. I would like to hide the entire actions in all flows (or hide the flow itself) so that flow logic cannot be read from a managed solution. Could you please let me know if this is possible in Power Platform?
Thank you.
Which trigger do you use in your flow. Depending on the type of flow you could remove user’s access to flows.
Hi Pieter,
All the flows are triggered from power apps (V2). I’m concerned about admins access to flows in managed solution and not end users access.
Thanks
hello ..good day..
how could someone disable the edit in my power app canvas apps? i am going to share my canvas apps but only they can use them but not edit
atte Adolpoagustini
Which data source are you using? Dataverse? It could be that users have a different user role assigned.