Hello @Landrover ,
Thank you for reaching out. I would request you to please try and use MgGraph Command: Get-MgServicePrincipalOwner. I have created a sample script with output which you can use as a base and modify for a more specific data.
Connect-MgGraph
Select-MgProfile -Name beta
$servicePrincipals = Get-MgServicePrincipal -All
foreach ($App in $servicePrincipals)
{
Get-MgServicePrincipalOwner -ServicePrincipalId $App.Id | Select-Object @{N='ServicePrincipalId';E={$App.Id}}, @{N='ServicePrincipalDisplayName';E={$App.AppDisplayName}}, @{N='OwnerObjectID';E={$_.Id}}, @{N='OwnerDisplayName';E={$_.AdditionalProperties.displayName}}
}
Screenshot of the Output:
I hope this helps to resolve your query. Please "Accept the answer" if the information helped you. This will help us and others in the community as well.