How to Transfer Power Apps Ownership Using PowerShell
As Power Platform environments grow, managing app ownership becomes a routine but critical administrative task. Whether a developer is moving to a new role, leaving the company, or an app was simply created under the wrong service account, orphaned apps can cause significant maintenance bottlenecks.
While you can change ownership through the Power Platform admin center UI, using PowerShell is often much faster—especially when you need to automate the process or update multiple apps at once.
Here is a step-by-step guide to transferring canvas app ownership using the Power Apps Administration PowerShell module.
Prerequisites
Before running the scripts, ensure you have the necessary administrative privileges (Power Platform Administrator or Global Administrator) and the correct PowerShell module installed.
Open PowerShell as an Administrator and install the module if you haven’t already:
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell -Force
Step 1: Authenticate Your Session
First, you need to connect to your Power Platform environment. Run the following command, which will prompt a login window for your admin credentials:
Add-PowerAppsAccount
Step 2: Gather the Required IDs
To transfer the app, you need three specific pieces of information:
- Environment ID: The GUID of the environment where the app lives.
- App ID: The GUID of the canvas app itself.
- New Owner ID: The Entra ID (Azure AD) Object ID of the user taking over the app.
You can easily find the Environment ID and App ID by looking at the URL when you have the app open in the Power Apps maker portal.
Finding the New Owner’s Object ID requires checking Microsoft Entra ID. While you can look this up manually in the admin center, it’s much faster to grab it using PowerShell. You can use either the modern Microsoft Graph PowerShell module (recommended) or the legacy Azure AD module.
Option A: Using Microsoft Graph PowerShell (Recommended) Since Microsoft officially deprecated the Azure AD PowerShell module, this is the best practice method. Ensure you have the Microsoft.Graph module installed.
# Connect to Microsoft Graph
Connect-MgGraph -Scopes "User.Read.All"
# Retrieve the Object ID by passing the user's email address
$NewOwner = Get-MgUser -UserId "newowner@yourdomain.com"
$NewOwner.Id
Option B: Using Azure AD PowerShell (Legacy) If you are still using the older AzureAD module, you can retrieve the ID like this:
# Connect to Azure AD
Connect-AzureAD # Retrieve the Object ID
$NewOwner = Get-AzureADUser -ObjectId "newowner@yourdomain.com"
$NewOwner.ObjectId
Step 3: Execute the Ownership Transfer
Once you have these three GUIDs (Environment ID, App ID, and the New Owner’s Object ID), you are ready to execute the transfer.
Use the Set-AdminPowerAppOwner cmdlet. This command will strip the primary ownership from the previous user and assign it to the new user.
# Define your variables
$EnvironmentID = "00000000-0000-0000-0000-000000000000" # Replace with your Environment ID
$AppID = "11111111-1111-1111-1111-111111111111" # Replace with your App ID
$NewOwnerObjectID = "22222222-2222-2222-2222-222222222222" # Replace with the New Owner's Object ID
# Execute the ownership change
Set-AdminPowerAppOwner -EnvironmentName $EnvironmentID -AppName $AppID -AppOwner $NewOwnerObjectID
Write-Host "Ownership successfully transferred!" -ForegroundColor Green
Step 4: Verify the Change
It is always good practice to verify that the command ran successfully. You can retrieve the app details and check the Owner property to confirm the new user is listed:
Get-AdminPowerApp -EnvironmentName $EnvironmentID -AppName $AppID
Important Considerations
- Role Changes: The previous owner will automatically be downgraded to a “Can Edit” (Co-owner) role. If you want to completely remove their access, you will need to run
Remove-AdminPowerAppRoleAssignmentafterward. - Connections: Changing the owner does not automatically update the connections used within the app. The new owner must open the app in the Power Apps Studio, re-authenticate or replace the data connections, and publish a new version to ensure everything functions correctly for end users.