By using "createUserGroup" WF you will be able to create only UserGroups of type "Security Group - Global". I think that this can be workarounded by later setting the attribute "groupType" of the UserGroup object to(see table bellow):
Group Type | Constant | Value |
Global group | ADS_GROUP_TYPE_GLOBAL_GROUP | &H2 |
Domain local group | ADS_GROUP_TYPE_DOMAIN_LOCAL_GROUP | &H4 |
Universal group | ADS_GROUP_TYPE_UNIVERSAL_GROUP | &H8 |
Security group | ADS_GROUP_TYPE_SECURITY_ENABLED | &H80000000 |
However when I tried this I got an AD error probably stating insufficient priveleges.
The code I use is:
userGroup.setAttribute("groupType", "&H4");
The error I got was:
Unable to remove attribute: Error while modifying element: [LDAP: error code 21 - 00000057: LdapErr: DSID-0C090A85, comment: Error in attribute conversion operation, data 0, vece ]