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.5.94
Syntax public XHRServiceResponseGeneric<QueryADResult> QueryAD(
string bindUser,
string bindPass,
string searchQuery,
string groupNameField,
string groupUsersField,
string userIdField,
string userNameField,
string userEmailField,
string providerName = ""
)
Public Function QueryAD (
bindUser As String,
bindPass As String,
searchQuery As String,
groupNameField As String,
groupUsersField As String,
userIdField As String,
userNameField As String,
userEmailField As String,
Optional providerName As String = ""
) As XHRServiceResponseGeneric(Of QueryADResult)
public:
virtual XHRServiceResponseGeneric<QueryADResult^>^ QueryAD(
String^ bindUser,
String^ bindPass,
String^ searchQuery,
String^ groupNameField,
String^ groupUsersField,
String^ userIdField,
String^ userNameField,
String^ userEmailField,
String^ providerName = L""
) sealed
abstract QueryAD :
bindUser : string *
bindPass : string *
searchQuery : string *
groupNameField : string *
groupUsersField : string *
userIdField : string *
userNameField : string *
userEmailField : string *
?providerName : string
(* Defaults:
let _providerName = defaultArg providerName ""
*)
-> XHRServiceResponseGeneric<QueryADResult>
override QueryAD :
bindUser : string *
bindPass : string *
searchQuery : string *
groupNameField : string *
groupUsersField : string *
userIdField : string *
userNameField : string *
userEmailField : string *
?providerName : string
(* Defaults:
let _providerName = defaultArg providerName ""
*)
-> XHRServiceResponseGeneric<QueryADResult>
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:
XHRServiceResponseGenericQueryADResultList of Groups that contains Users
Examples
Sample JSON return
{
"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