Change the owner of a canvas app using PowerShell for Power Apps

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… READ MORE [https://lewisdoes.dev/blog/change-the-owner-of-a-canvas-app-using-
blue metal tool
Photo by Killian Eon on Pexels.com
In: Low Code Lewis Content 🚀

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!

Prerequisites

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.

Add-PowerAppsAccount

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.

Written by
Lewis Baybutt
Microsoft Business Applications MVP • Power Platform Consultant • Blogger • Community Contributor • #CommunityRocks • #SharingIsCaring
Comments
Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to LewisDoesDev.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.