Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4    Statistic  

LDAP.Search

Performs a search.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
LDAP 6.0 Yes Yes Yes Yes No

MBS( "LDAP.Search"; LDAPRef; Base; Scope; Filter; Attributes; AttributesOnly { ; Timeout; Size Limit } )

Parameters

Parameter Description Example value
LDAPRef The reference number for the LDAP connection. $ldap
Base the distinguished name of the entry at which to start the search.
Scope Value to indicate the search scope. Can be:

Base: Search the base entry only.
OneLevel: Search all entries in the first level below the base entry, excluding the base entry.
Subtree: Search the base entry and all entries in the tree below the base.

On Mac can also be Children.
"Subtree"
Filter A text that specifies the search filter.
Attributes List indicating which attributes to return for each matching entry.
AttributesOnly Boolean value that should be 0 if both attribute types and values are to be returned, 1 if only types are required. 0
Timeout Optional
Timeout in seconds.
Specifies both the local search time-out value, in seconds, and the operation time limit that is sent to the server within the search request.
10
Size Limit Optional
Limit on the number of entries to return from the search.
A value of zero indicates no limit.

Result

Returns OK or error.

Description

Performs a search.
Searches the LDAP directory and returns a requested set of attributes for each matched entry.

On success, you can use LDAP.SearchResult.Count to find out the number of entries found.

Examples

Search for name:

MBS( "LDAP.Search"; $ldap; "dc=example,dc=com"; "Subtree"; "(sn=Jensen)")

Find entries with a givenName:

MBS("LDAP.Search"; $ldap; ""; "Subtree"; "(givenName=*)"; ""; 0; 20; 999)

See also

Example Databases


LDAP.Rename   -   LDAP.SearchResult.AttributeCount

Feedback: Report problem or ask question.




Links
MBS Xojo tutorial videos