This data source will allow you to list all of your domain's groups inside of a dynamic form. This is useful for tasks that need modify group objects, such as adding one or more members, or updating the group's details in Active Directory.
Create the data source task
- Navigate to Automation > Tasks.
- Create a new custom PowerShell task and name it "DataSource: List all Active Directory groups"
- Select an appropriate agent pool to run the task.
- In the Task tab, deselect Use template.
- Paste in the following script and save the task.
# Get a list of all groups in the domain $objects = Get-ADGroup -Filter * | Select DistinguishedName,Name,ObjectGUID # Return the group info to HelloID foreach($item in $objects) { $row = @{} $item.psobject.properties | Foreach { $row[$_.Name] = $_.Value.ToString() } Hid-Add-TaskResult -ResultValue $row }
Create the data source
- Navigate to Self Service > Data sources.
- Create a new data source with the name "Active Directory groups"
- In the Type dropdown, select Task Data Source.
- In the dropdown that appears, select your previously created data source task and click Execute task.
- When a result is returned by the task, click Suggest a model.
- Save the data source.