iTranslated by AI
Changing Power Apps Owner with PowerShell
I am writing this article based on the following thread.
In PowerApps, even if the app creator's account is deleted due to reasons like resignation, the app itself remains. If it has been shared, this isn't an issue, but if you were the only one using it, no one will be able to edit the app. To avoid this, a method to change the app owner is provided. In this article, I will introduce how to change the app owner using PowerShell.
First, you can check the list of apps in your organization from the admin center. In this example, I will change the owner of an "orphan app."

The PowerShell administration module can be obtained from the PowerShell Gallery.
Import the module and log in.
PS C:\> Import-Module Microsoft.PowerApps.Administration.PowerShell
PS C:\> Add-PowerAppsAccount
To get a list of apps, use the Get-AdminPowerApp command.
PS C:\> Get-AdminPowerApp
AppName : 4e3bd861-3ae1-4e15-a5e3-93e8585cbfdd
DisplayName : Password Manager
CreatedTime : 2018-08-24T01:33:36.3124145Z
...
AppName : 60ebc075-e5a3-49d3-8163-c216ecc688b0
DisplayName : Orphan App
CreatedTime : 2019-08-29T06:02:42.8999503Z
...
To change the app owner, use Set-AdminPowerAppOwner. All parameters must be specified as GUIDs.
PS C:\> Set-AdminPowerAppOwner -AppName 60ebc075-e5a3-49d3-8163-c216ecc688b0 -EnvironmentName Default-92dbed3f-d37a-4f19-a392-f6970505cc6a -AppOwner 4b34f1e2-0c77-4fbd-a8cf-94a4606021ee
Code :
Description :
Error :
Errors :
Internal : @{name=60ebc075-e5a3-49d3-8163-c216ecc688b0; id=/providers/Microsoft.PowerApps/apps/60ebc075-e5a3-49d3-81
63-c216ecc688b0; type=Microsoft.PowerApps/apps; tags=; properties=}
The owner has been changed.

Discussion