Using the UI at make.powerapps.com, it’s pretty easy to add co-owners to our apps in Power Apps! But what if we want to change the primary owner of our app…
In this blog post I’m going to show you how to do this using PowerShell for Power Apps!
To make the changes we’re going to make in this blog post you’ll need to pass the following prerequisites…
- Have a Power Platform Admin, Dynamics 365 Admin or Global Administrator AAD role.
- Have the Power Apps Administration PowerShell module installed
Connect to Power Apps via PowerShell
Okay so the first thing we need to do is make a connection to our Power Platform tenant. You can do this by running the command below. This will open up a prompt to authenticate using SSO.
Changing the owner of a canvas app
Now let’s take a look at the command we need to run to change the primary owner of a canvas app.
Set-AdminPowerAppOwner –AppName 'AppName' -AppOwner $Global:currentSession.userId –EnvironmentName 'EnvironmentName'
Simply use the command above replacing the values ‘AppName’ and ‘EnvironmentName’ to reflect your app and environment.
Note that you need to populate GUIDs here, not display names.
That’s it! Your app should now have its new owner set. Try it out and let me know in the comments how this went for you.