You can run the New-MgApplicationOwnerByRef cmdlet to add an owner to the target app.
Import-Module Microsoft.Graph.Applications
$params = @{
"@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/{user id}"
}
New-MgApplicationOwnerByRef -ApplicationId $appObjectId -BodyParameter $params
Or run the Remove-MgApplicationOwnerByRef cmdlet to remove the app owner.
Hope this helps.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.