I registered an application and added it as a Service Principal according to this guide: https://learn.microsoft.com/en-us/power-platform/admin/powershell-create-service-principal. I then logged in as this service principal.
I am trying to get a list of all Power Apps using the PowerShell command Get-AdminPowerApp. However, it gets a few (in my case 52) and then it fails with:
CreateAppObject : Cannot bind argument to parameter 'AppObj' because it is null.
At C:\Program Files\WindowsPowerShell\Modules\Microsoft.PowerApps.Administration.PowerShell\2.0.180\Microsoft.PowerApps.Administration.Powershell.psm1:9305 char:41
+ CreateAppObject -AppObj $app
+ ~~~~
+ CategoryInfo : InvalidData: (:) [CreateAppObject], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,CreateAppObject
However, if I log in using a username and a password instead of a service principal it works without issues.
Anyone know why?