Click or drag to resize

MembershipProvidersServicesQueryAD Method


Queries the Active Directory specified in the Active Directory Membership Provider connection string (local-connection-strings.config). Retrieves the listing of Group and User directory entries.

Namespace:  IngeniuxCMService
Assembly:  IngeniuxCMService (in IngeniuxCMService.dll) Version: 10.3.169
Syntax
public XHRServiceResponseGeneric<QueryADResult> QueryAD(
	string bindUser,
	string bindPass,
	string searchQuery,
	string groupNameField,
	string groupUsersField,
	string userIdField,
	string userNameField,
	string userEmailField,
	string providerName = ""
)

Parameters

bindUser
Type: SystemString

The user account to connect to Active Directory, need to include domain information

Examples
ingeniux\jdoe
bindPass
Type: SystemString
The password for the connecting user account
searchQuery
Type: SystemString
The query for searching User Groups in Active Directory, default "(&(objectCategory=group))"
groupNameField
Type: SystemString
The field for Group Name in Group Account directory entry, default "sAMAccountName"
groupUsersField
Type: SystemString
The field for Users in Group Account directory entry, default "member"
userIdField
Type: SystemString
The field for User Id in User Account directory entry, default "sAMAccountName" also
userNameField
Type: SystemString
The field for User Name in User Account directory entry, default "displayName"
userEmailField
Type: SystemString
The field for User Email Address in User Account directory entry, default "mail"
providerName (Optional)
Type: SystemString

[Missing <param name="providerName"/> documentation for "M:IngeniuxCMService.MembershipProvidersServices.QueryAD(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String)"]

Return Value

Type: XHRServiceResponseGenericQueryADResult

List of Groups that contains Users

Examples
Sample JSON return
JavaScript
{
    "code": 0,
    "error": null,
    "message": {
        "usersAndGroups": {
            "Domain": "imda",
            "Groups": [{
                "GroupName": "Executives",
                "Users": [{
                    "Email": "Jimmy.Eddie@imda.com",
                    "UserID": "jime",
                    "UserName": "Jimmy Eddie"
                }, {
                    "Email": "Natie.Eggy@imda.com",
                    "UserID": "neggy",
                    "UserName": "Natie Eggy"
                }, {
                    "Email": "Shane.McMahon@imda.com",
                    "UserID": "shanmc",
                    "UserName": "Shane McMahon"
                }]
            }, {
                "GroupName": "Account Operators",
                "Users": []
            }, {
                "GroupName": "AccountManagement",
                "Users": [{
                    "Email": "Jimmy.Eddie@imda.com",
                    "UserID": "jime",
                    "UserName": "Jimmy Eddie"
                }, {
                    "Email": "Rob.Doe@imda.com",
                    "UserID": "robdo",
                    "UserName": "Rob Doe"
                }, {
                    "Email": "Sean.Riddle@imda.com",
                    "UserID": "seanrid",
                    "UserName": "Sean Riddle"
                }, {
                    "Email": "Shane.McMahon@imda.com",
                    "UserID": "shanmc",
                    "UserName": "Shane McMahon"
                }]
            }]
        }
    }
}
See Also