I am trying to find out how to the listed owner of a VM in VCAC via a vco/vro workflow. The property "__Legacy.Workflow.User" does not provide what i need. I am doing imports and the "__Legacy.Workflow.User" show the user who ran in the import not the user who is listed as the owner of the vm. I would also like to update the "__Legacy.Workflow.User" so that is actually matches the true owner of the vm.
The problem comes from the fact that the import functions does not seem to set many of the properties that are normal set when the a vm is order through the order.
When vCAC/vRA provisions a VM, it also stamps a "VRM Owner" custom attribute onto the VM in vCenter. If you can't see it from the vSphere Web Client, look at the VM in the legacy vSphere Client, under Annotations. If this has the correct value you're looking for, then Orchestrator comes with a "Get custom attribute" workflow that you can use to read it from the VM. Hope that helps!
var ownerEntity = virtualMachineEntity.getLink(vCACHost, "Owner")[0];
var ownerName = ownerEntity.getProperty("UserName");
That array is important... Much of the API is read only on that array, but I have been able to hack in multiple owners.
There are several ways to get the Entity depending on what you are doing.