Please check below screen shot of Account. You can simply check this with OwnerIdType, yet you can’t retrieve that field for some reason.
In fact, I tried below approach which worked for me.
String OwningEntityType = String.Empty; if (_account.OwningTeam != null) { OwningEntityType = "team"; } else { OwningEntityType = "systemuser"; } AssignRequest assignAcc = new AssignRequest { Assignee = new EntityReference(OwningEntityType, _account.OwnerId.Id), Target = new EntityReference(<Target Entity Name>, <Target Entity Name ID>) }; organizationService.Execute(assignAcc);