How to Change Solution Owner in the Power Platform

Solutions are the back bone to alm in power apps and power automate. Creating a package containing all your components, add in they are the only way to have connection references and environment variables, without them there is no alm.
Unfortunately th…


This content originally appeared on DEV Community and was authored by david wyatt

Solutions are the back bone to alm in power apps and power automate. Creating a package containing all your components, add in they are the only way to have connection references and environment variables, without them there is no alm.
Unfortunately they were an after thought, rather then by design, which means they are not as polished as they could be, although every update they do seem to improve.

The big issue I found was how to change the owner of a solution, there is no simple way to do it. If you have used the Power Platform you will realise this is a pattern, as changing the owner of anything use to be a challenge. This has started to change, Power Automate flows can now easily be changed (solution aware that is) and Canvas Apps through a connector, but what about solutions. Well it turns out no one owns a solution, think of it more as bag of components rather then a collection, as it just holds them rather then combines them.
So what does that mean, well we have to change each component of the solution individually. Now Apps and Flows are easy, but what about everything else, well there we need to get a little creative and leverage the underlining database used, ie. Dataverse.

In this guide I will cover the main types, but you will see a pattern emerge pretty quickly, so covering things like security roles etc will be very similar.

  1. Cloud Flows
  2. Canvas Apps
  3. Envirnoment Variables
  4. Connection References
  5. Custom Connectors

1. Cloud Flows

The easiest one by far (thankfully as if not a solution aware it is a lot more complex). First you need to share ownership with the new owner. Then click details, where you can see flow owner, change to the new owner. Finally remove previous owner from shared with.

Flow change Owner

Note with all these changes we do not change the connections, as this requires the new owner to sign in

2. Canvas Apps

Not quite as simple, but we can with the help of a flow. We use Set App Owner connector.

Flow change app owner

We need to pass in 3 key inputs:

  • Environment ID (found in url or session details)
  • App ID: (found in app details section)
  • AAD ID: (tricky one found in Azure Portal under Active Directory Users)

The set inputs should be:

  • API version: 2016-11-01
  • Content Type: application/json
  • Role For Old App Owner: CanView

And thats it. More info can be found here MSlearn-set-app-owner

3. Envirnoment Variables

Now we are leaving easy and moving to a little more challenging. As I said solutions and components leverage dataverse, so our environment variables are just a dataverse table. But because it's a system table we can't edit it in the PowerApp table view, we have to go back in time. The Power Platform is built on dynamics, and therefor to edit the system tables we sometimes have to go to the dynamics (legacy) settings. These can only be found in make.powerapps.com, not make.powerautomate.com.

advanced settings

This has taken us to the dyanmics environment, and we need to find and edit out environment variables definitions table (not the values table).

Dynamics query

First we click on the filter icon to open the query popup. The query editor is quite powerful so we can build a query with multiple conditions. But in these examples we are going to presume there isn't many environment variables so we can view all.

environment variable table

We need to select the environment varaibles definitons table, then click results. You should see a list of all variables, find the one you need and click it.

Dynamics filter results

As you can see it has opened a model driven app record screen, we just need to change owner to our new owner. And thats it.

environment variables definition form

You can see above the variable type (data) and even the value (even though thats in another table)

4. Connection References

Connection References are similar to Envirnoment Variables, we go to advance settings again, filter but select the Connection Reference table.

connection reference table

But after selecting a Connection Reference it's now a little different. It's not been updated to the new dataverse form, so it opens the old dynamics form. Apart from the visuals it's almost the same, except insted of updating the Owner field we click on the Assign to select the new owner - yep you can see that this is built on a CRM (Customer Relationship Management) software when we 'assign' ownership.

connection references form

5. Customer Connectors

This is exactly same as Connection References, again we go to our classic Dynamics site and query popup. But again we select a different table, the Connectors table.

connectors table

It's the classic form and we assign.

custom connector form

Bonus here we can also share our connection references and custom connectors (as the share button for custom connectors doesnt work in solution aware custom connectors). We just use share instead of assign.

share custom connector

A popup will now show who you have already shared with and what permissions you have given.

share custom connector permissions

Add User/Team opens popup where you can search and add users or security groups.

This also works for connection references. Environment variables are similar, we use share instead of assign/ click on owner.

environment variable share

Click add and type in who to share with. Select them and click on the name to see same permissions selector but in new modern view.

environment variable share permissions

As you can see changing the owner of multiple solution components can be time consuming so let's hope Microsoft simplifies the process. But the sharp eyed may have realised because these are just Dataverse tables we can create a Power Automate flow to do everything automatically (if you want to see how to in a part 2 let me know).

As the Power Platform continues to develope it appears more and more will be saved in dataverse aka dynamics, and as shown you can do a lot by going under the hood and updating the record directly in the database.


This content originally appeared on DEV Community and was authored by david wyatt


Print Share Comment Cite Upload Translate Updates
APA

david wyatt | Sciencx (2023-05-03T08:27:57+00:00) How to Change Solution Owner in the Power Platform. Retrieved from https://www.scien.cx/2023/05/03/how-to-change-solution-owner-in-the-power-platform/

MLA
" » How to Change Solution Owner in the Power Platform." david wyatt | Sciencx - Wednesday May 3, 2023, https://www.scien.cx/2023/05/03/how-to-change-solution-owner-in-the-power-platform/
HARVARD
david wyatt | Sciencx Wednesday May 3, 2023 » How to Change Solution Owner in the Power Platform., viewed ,<https://www.scien.cx/2023/05/03/how-to-change-solution-owner-in-the-power-platform/>
VANCOUVER
david wyatt | Sciencx - » How to Change Solution Owner in the Power Platform. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2023/05/03/how-to-change-solution-owner-in-the-power-platform/
CHICAGO
" » How to Change Solution Owner in the Power Platform." david wyatt | Sciencx - Accessed . https://www.scien.cx/2023/05/03/how-to-change-solution-owner-in-the-power-platform/
IEEE
" » How to Change Solution Owner in the Power Platform." david wyatt | Sciencx [Online]. Available: https://www.scien.cx/2023/05/03/how-to-change-solution-owner-in-the-power-platform/. [Accessed: ]
rf:citation
» How to Change Solution Owner in the Power Platform | david wyatt | Sciencx | https://www.scien.cx/2023/05/03/how-to-change-solution-owner-in-the-power-platform/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.