Error=; Message=Object id 'xxxxx' cannot be the owner of app because their principal type is
'NotSpecified', and it must be 'User'
Not having a clue what this really means, I went in and added the person to the app as a user. This was 2 hours ago and I am still getting this error.
I have figured this out. It's the Azure AD Object ID that it's looking for. Your answer made me start looking somewhere else. Thank you for the help.
And where do I get this? Is this an Azure AD value? It's not an Active Directory value.
I will try that. This is an example of the very poor documentation. I had to guess which value to use. I searched for documentation for this command and there wasn't any documentation I could find that specified which value to use for this.
From the role assignment, try to use the PrincipalObjectID in the as parameter to the script below
Set-AdminPowerAppOwner -AppName 'GUID' -AppOwner @PrincipalObjectID -EnvironmentName 'GUID'
====================================================
Same issue and I don't understand why.
Please makesure the GUID is correct for the user.
I tested script below and it should work as expected.
# Import the module
Import-Module Microsoft.PowerApps.Administration.PowerShell
#Get-AdminPowerApp
Set-AdminPowerAppOwner -AppName 'GUID' -AppOwner 'GUID' -EnvironmentName 'GUID'
====================================================
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2