Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Documentation
---------------------------------------

<a name="authenticate" />

### authenticate(username, password, callback)

Authenticates the username and password by doing a simple bind with the specified credentials.
Expand Down Expand Up @@ -97,6 +98,7 @@ ad.authenticate(username, password, function(err, auth) {
---------------------------------------

<a name="isUserMemberOf" />

### isUserMemberOf(opts, username, groupName, callback)

Checks to see if a user is a member of the specified group. This function will also check for group membership inside of a group. Even if a user is not explicity listed as a member of a particular group, if a group that the user is a member of belongs to the group, then this function will return true.
Expand Down Expand Up @@ -127,6 +129,7 @@ var ad.isUserMemberOf(username, groupName, function(err, isMember) {
---------------------------------------

<a name="groupExists" />

### groupExists(opts, groupName, callback)

Checks to see if the specified group exists.
Expand Down Expand Up @@ -155,6 +158,7 @@ ad.groupExists(groupName, function(err, exists) {
---------------------------------------

<a name="userExists" />

### userExists(opts, username, callback)

Checks to see if the specified user exists.
Expand Down Expand Up @@ -183,6 +187,7 @@ ad.userExists(username, function(err, exists) {
---------------------------------------

<a name="getUsersForGroup" />

### getUsersForGroup(opts, groupName, callback)

For the specified group, retrieve all of the users that belong to the group. If the group contains groups, then the members of those groups are recursively retrieved as well to build a complete list of users that belong to the specified group.
Expand Down Expand Up @@ -215,6 +220,7 @@ ad.getUsersForGroup(groupName, function(err, users) {
---------------------------------------

<a name="getGroupMembershipForUser" />

### getGroupMembershipForUser(opts, username, callback)

For the specified username, retrieve all of the groups that a user belongs to. If a retrieved group is a member of another group, then that group is recursively retrieved as well to build a complete hierarchy of groups that a user belongs to.
Expand Down Expand Up @@ -244,6 +250,7 @@ ad.getGroupMembershipForUser(sAMAccountName, function(err, groups) {
---------------------------------------

<a name="getGroupMembershipForGroup" />

### getGroupMembershipForGroup(opts, groupName, callback)

For the specified group, retrieve all of the groups that the group is a member of. If a retrieved group is a member of another group, then that group is recursively retrieved as well to build a complete hierarchy of groups that a user belongs to.
Expand Down Expand Up @@ -273,6 +280,7 @@ ad.getGroupMembershipForGroup(groupName, function(err, groups) {
---------------------------------------

<a name="find" />

### find(opts, callback)

Perform a generic search for the specified LDAP query filter. This function will return both
Expand Down Expand Up @@ -320,6 +328,7 @@ ad.find(query, function(err, results) {
---------------------------------------

<a name="findDeletedObjects" />

### findDeletedObjects(opts, callback)

If tombstoning (recycle bin) is enabled for the Active Directory installation, use findDeletedObjects to retrieve
Expand Down Expand Up @@ -361,6 +370,7 @@ ad.findDeletedObjects(opts, function(err, result) {
---------------------------------------

<a name="findUser" />

### findUser(opts, username, callback)

Looks up or finds a username by their sAMAccountName, userPrincipalName, distinguishedName (dn) or custom filter. If found, the returned object contains all of the requested attributes. By default, the following attributes are returned:
Expand Down Expand Up @@ -397,6 +407,7 @@ ad.findUser(sAMAccountName, function(err, user) {
---------------------------------------

<a name="findUsers" />

### findUsers(opts, callback)

Perform a generic search for users that match the specified filter. The default LDAP filter for users is
Expand Down Expand Up @@ -428,6 +439,7 @@ ad.findUsers(query, function(err, users) {
---------------------------------------

<a name="findGroup" />

### findGroup(opts, groupName, callback)

Looks up or find a group by common name (CN) which is required to be unique in Active Directory or optionally by the distinguished name. Supports groups with range retrieval specifiers. The following attributes are returned by default for the group:
Expand Down Expand Up @@ -467,6 +479,7 @@ ad.findGroup(groupName, function(err, group) {
---------------------------------------

<a name="findGroups" />

### findGroups(opts, callback)

Perform a generic search for groups that match the specified filter. The default LDAP filter for groups is
Expand Down Expand Up @@ -498,6 +511,7 @@ ad.findGroups(query, function(err, groups) {
---------------------------------------

<a name="getRootDSE" />

### getRootDSE(url, attributes, callback)

Retrieves the root DSE for the specified url. Can be called statically.
Expand Down Expand Up @@ -638,6 +652,7 @@ ad.findUser(opts, '[email protected]', function(err, user) {
```

<a name="opts" />

### Optional Parameters / Extended Functionality

Any method which takes an 'opts' parameter allows for additional options. Options for both activedirectory.js
Expand Down