Gathering Information Needed To Change The Power Apps App Owner
To change the owner of a Power Apps app we will need to gather 3 pieces of information:
- Environment ID from the Power Apps maker portal
- App ID from the Power Apps maker portal
- User Account Object ID from Azure Active Directory
Obtain The Environment ID
Open make.powerapps.com and open the settings menu. Choose developer resources.
The Environment ID will appear in the developer resources menu:
6955xxxx-fxxx-4xxx-axxx-2bxxxxxxxxxx
Get The Power Apps App ID
Go to the Apps menu in the maker portal, select the three dots beside the app then click Details.
The App ID will appear in the Details menu:
edxxxxxx-5xxx-4xxx-axxx-66xxxxxxxxxx
Currently, you can see the Owner of the App is Hexuan Weng.
Find The New Owner’s User Account Object ID
Login to portal.azure.com and search for the user account you want to transfer ownership to. In this case we will make a user called Power Platform Service Account the Owner.
The Object ID will appear in the user’s profile.
dexxxxxx-fxxx-4xxx-8xxx-f1xxxxxxxxxx
Method 1: Change Power Apps App Owner With A Flow
The first way we can change the owner of a Power Apps app is by building a flow to transfer ownership. Create a new Power Automate flow with an instant trigger. Name the flow Change App Owner, select Manually trigger a flow then click Create.
Add the flow action Power Apps For Admins – Set App Owner with the following parameters and fill in the environment name, Power App Name and New PowerApp Owner with the unique identifiers we gathered earlier.
In this step:
1 | $EnvironmentName = Environment ID |
Run the flow.
The Power Platform Service Account now owns the app.
Method 2: Change Power Apps App Owner With PowerShell
If you like to use PowerShell for automating administrative tasks there is a robust library of Power Apps cmdlets including a cmdlet to set the Power App owner. Open the Windows PowerShell ISE and Run as administrator.
Create a new script called ChangeAppOwner.ps1
Paste the following code into the text editor. Switch the environment name, app name and new app owner with your own information then press the green play button to execute the script.
1 | $EnvironmentName = '6955xxxx-fxxx-4xxx-axxx-2bxxxxxxxxxx' |
Possible Error
There are a couple of possibilites
- You need to be a Global Admin or AAD Admin in the tenant to run the “Admin” commands. Are you a global admin?
- Are you supplying the GUIDS for the Appname, Environment, and AppOwner? The examples all show guids, rather than just names.
Method 3: Change Power Apps App Owner Using The Center Of Excellence Starter Kit
The Power Apps Center Of Excellence Starter Kit offers the easiest way to change a Power Apps App owner. Open the canvas app called Admin – App Permission Center that is included in the CoE Starter Kit. Browse to the app’s environment, select the app from the list and then click Add Permissions.