Microsoft ldap search


















You can refine search objects using the objectCategory and objectClass attributes. You can get a list of users with membership in a specific Active Directory group :. Would love to see an example to list AD users with membership in a particular AD group.

Hi, Thanks for the info. A pointer to a null-terminated string that specifies the search filter. For more information, see Search Filter Syntax. A null-terminated array of null-terminated strings that indicate which attributes to return for each matching entry. Pass NULL to retrieve available attributes. Boolean value that should be zero if both attribute types and values are to be returned, nonzero if only types are required.

If the function fails, it returns —1 and sets the session error parameters in the LDAP data structure. Three settings in the LDAP structure affect a search:. It lists the first ten, or fewer, users and the names and values of a selected subset of attributes for the user. Determining the type for each attribute can become complex, and is not shown in this code example.

Due to the complexity of this operation, it is recommended that, when possible, you use the ADSI interface for searching Active Directory, where much of the complexity has been minimized. However, if you must use LDAP in your application, the following code example should help. Provide the host name and set up the options for the session.



0コメント

  • 1000 / 1000