Active Directory

A data source that queries active directory for members of specified groups.

Once loaded, the information returned from active directory is made available for later liquid templates to use as input.

Parameters

An active directory document may specify the following parameters:

Parameter Description Cardinality
id A unique identifier used to identify this active directory fragment. Optional

Content

The content of an active directory document is yaml data containing a list of the active directory groups to query. There may be any number of groups listed.

Each definition needs a unique name. This name will be used to publish the results of the query as data for later processing.

Within each group definition, the following properties may be set:

Property Description Cardinality Default
Group Name of the active directory group to query. Mandatory
Context Context within which to query active directory. Optional Domain
One of: ActiveDirectory, Domain, Machine

Examples

The examples listed here demonstrate the required format for listing the groups, as well as some permitted variations.

List Machine Administrators

This would list all of the administrators for current machine:

:: activedirectory ::
administrators:
    context: machine
    group: Administrators

If you don't specify otherwise, Document.Factory assumes the name of the active directory group is the same as the name of the definition itself.

This allows you to omit the name of the group if the name of the definition matches:

:: activedirectory ::
administrators:
    context: machine

It also allows you to vary the name of the definition without changing which group is queried:

:: activedirectory ::
admin:
    context: machine
    group: Administrators

List Domain Administrators

This will list all of the administrators for the current domain:

:: activedirectory ::
administrators:
    context: domain
    group: Administrators

If you don't specify otherwise, queries will be run against the domain.

This allows you to omit context if you want to query the domain:

:: activedirectory ::
administrators:
    group: Administrators

List Domain Group

This will list all of the members of the group Laptop Users:

You can use a different name for the definition than the name of the group itself.

:: activedirectory ::
laptopUsers:
    group: Laptop Users

Since the actual name of the group contains a space, it's not a valid identifier within Document Factory. Fortunately, you can use another name for the definition.

For very simple situations like this, a shorthand format is available:

:: activedirectory ::
laptopUsers: Laptop Users