Hey
vCACCAFEAuthenticationGroupService() doesn't seem to have a method for creating a group but it does have one for saving a group.. so this might help you (not tested it though)...
var client = vCACCAFEHost.createAuthenticationClient();
var service = client.getAuthenticationGroupService();
service.saveCustomGroup(tenant,group);
group is an instance of vCACCAFEGroup
🙂
Looks like I am chasing it through rest API.
Hey
vCACCAFEAuthenticationGroupService() doesn't seem to have a method for creating a group but it does have one for saving a group.. so this might help you (not tested it though)...
var client = vCACCAFEHost.createAuthenticationClient();
var service = client.getAuthenticationGroupService();
service.saveCustomGroup(tenant,group);
group is an instance of vCACCAFEGroup
🙂
Thanks Craig. Nice job! Here is the group buildup...
=====================
group = new vCACCAFEGroup();
type = vCACCAFEType.fromValue("CUSTOM");
principalId = new vCACCAFEPrincipalId();
principalId.setDomain("vsphere.local");
principalId.setName("testyTesty");
group.setGroupType(type);
group.setName("testyTesty");
group.setDomain("vsphere.local");
group.setDescription("So much work");
group.setPrincipalId(principalId);
var client = cafeHost.createAuthenticationClient();
var service = client.getAuthenticationGroupService();
service.saveCustomGroup("vsphere.local",group);
========================
It is a little bit easier to do through REST post, but I like having options.
-----------------------------------
POST /tenants/vcac.local/groups
{ "@type": "Group", "groupType": "CUSTOM", "name": "Developers", "domain": "vcac.local", "description": "Developer Group", "principalId": { "domain": "vcac.local", "name": "DevGroup" } }