Hello everyone,
we have a working workflow in vSphere 5.1 which set permissions on all vCenter objects from an XML file input.
I tried this workflow on our new test infra (VCSA 5.5 + VCO appliance 5.5.1) and I always have this error message : "The object or item referred to could not be found"
Here's the code sample :
var vcs = VcPlugin.allSdkConnections; var vc = vcs[0]; var perm_For_Object = new Array(); var permission = new VcPermission(); permission.group = false; permission.principal = "deploy"; permission.propagate = false; permission.roleId = rolesID.get("Admin"); perm_For_Object.push(permission); var allObjects = new Array(); var objects = Server.findAllForType("VC:VMFolder","xpath:name='perm'"); for each (var obj in objects) allObjects.push(obj); vc.authorizationManager.setEntityPermissions(objects[0],perm_For_Object);
Ofc, the folder "perm" exists and the user "deploy" is a local one from the VCSA.
Any help appreciated.
Regards