Transferring ownership in PowerApps – Canvas App

Canvas apps can be co-owned or have the owner replaced. If an owner is leaving, they can share the app through the Maker portal. This change does not affect the users with whom it is shared. If the owner of the app leaves without adding a co-owner, an admin can change the owner through PowerShell. Here are the steps to do this:

In this process, the current owner will become a Basic User

Requirements

  • You will need Tenant Admin access.
  • Make sure that PowerApps is not being edit by a user so it will not be marked as Locked in the system.
  • You must have the Environment Id (envId), App Id (appId) and the User Id (userId) that you want to assign as owner.

To retrieve the envId and appId, just navigate to app information and look at the URL for the ID.

For the userId, you quickly get from the user Profile. you may also use AzureAD cmdlet for this.

Main Process

Be sure you have the Power App cmdlets installed. You can do this with the following commands. Run PowerShell in admin mode and enter:

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

Next, run the Add-PowerAppsAccount cmdlet allowing you to add your account for Power Apps:

Add-PowerAppsAccount
PowerShell

Next, update the owner, using the appId, envId and userId

Set-AdminPowerAppOwner -AppName "<appId>" -EnvironmentName "<envId>" -AppOwner "<userId>"
  
PowerShell

Once the command is issued it will respond with this information which means success if the Code is blank.

New owner should now be the target user

Extras

An example error if the app is currently being edited by one of the co-owners.


Leave a Reply

Your email address will not be published. Required fields are marked *