Published: 03.Mar 2020
Categories:

How to change owner of PowerApps

From time to time you would need to change owner of PowerApps created in your organization. There is currently no GUI (March 2020) - way for that so we will use PowerShell 🙂 (as always).

First thing we need is AppName (App ID), which we will find in Details

PowerApps details

Next.

If you didn't already, you have to install two PowerShell modules:

Install-Module -Name Microsoft.PowerApps.Administration.PowerShell
Install-Module -Name Microsoft.PowerApps.PowerShell -AllowClobber

Next.

Probably there are a few ways on how to connect to PowerApps from PowerShell, you can read more here, but in this case we will use:

Get-PowerApp

This will open login dialog where you will need to add your company email address and password.

Get-PowerApp

After successful sign in, we can start with gathering more information. We will need "PrincipalObjectId" of our new owner, "EnvironmentName" and "App ID" from first step (i assume you shared app with users, and user who should be the new owner have access to this app - if not you have to share app with particular user).

To get that information we will use Get-PowerApp and Get-PowerAppRoleAssignment cmdlet:

Get-PowerApp -AppName <app id from first step> | Get-PowerAppRoleAssignment | Select PrincipalDisplayname, PrincipalObjectId, RoleType, AppName, EnvironmentName
Get-PowerApp -AppName

So we have information we need, let's change the owner with Set-AdminPowerAppOwner command:

Set-AdminPowerAppOwner -AppName <app id from first step> -AppOwner <PrincipalObjectId> -EnvironmentName <EnvironmentName>

That's it. After that you can check if you see new owner, either in PowerShell or in PowerApps GUI.

Please check article on Microsoft website for more Cmdlets you can use.

Hope you will find this useful, if so let me know in the comment 🙂

5 3 votes
Article Rating
Subscribe
Notify of
guest
3 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Jack
Jack
2 years ago

Thank you! That's exactly what i needed today.

Jun
Jun
2 years ago

typo found
Get-PowerAppRoleAssigment  -> Get-PowerAppRoleAssignment

Information was very helpful. Thank you.

PowerAddict.net - Lubomir Goban  ---  Find me on - 
LinkedIn
3
0
Would love your thoughts, please comment.x
()
x