Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
arr_groups = new Array()
System.log("Running active Directory Search")
var groups ="UserGroup", nameStartsWith)
var arr_ExceptionList = exceptionList.split(",")
for (var i in groups) {
if(arr_ExceptionList.indexOf(groups[i].name) == -1) {
return arr_groups
Copy link

mccbryan3 commented Feb 19, 2020

vRO - Get AD Groups in and Array to present in a dropdown with Exceptions

Usage of this script as an action in vRo:

This is an action script in vRo that should have two inputs as string.


Usage of this action in vRa blureprint custom form:

This should be set as a action based field in vRa and configured as pictured below.

Two examples below showing no exceptions with the "none" as a place holder and the other with multiple groups seperated by comma with no spaces.

The nameStartsWith fieled is the beginning of your group name. The exceptionList is a string that will be split by the comma in the action script to create an array of group names.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment