improved ad/userGroup.groovy (used only for externalGroup)