Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
LDAP.Search
Performs a search.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| LDAP | 6.0 | Yes | Yes | Yes | Yes | No |
MBS( "LDAP.Search"; LDAPRef; Base; Scope; Filter; Attributes; AttributesOnly { ; Timeout; Size Limit } ) More
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| 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. | "cn¶sn" | |
| 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 | 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 | Optional |
| Size Limit | Limit on the number of entries to return from the search. A value of zero indicates no limit. |
Optional |
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
- LDAP.Connect
- LDAP.SearchResult.AttributeCount
- LDAP.SearchResult.AttributeName
- LDAP.SearchResult.AttributeNames
- LDAP.SearchResult.AttributeValue
- LDAP.SearchResult.AttributeValueCount
- LDAP.SearchResult.AttributeValues
- LDAP.SearchResult.AttributeValuesByName
- LDAP.SearchResult.Count
- LDAP.SearchResult.DistinguishedName
Example Databases
Blog Entries
- MBS FileMaker Plugin, version 8.5pr7
- LDAP with JSON
- MBS FileMaker Plugin, version 7.0pr4
- LDAP in FileMaker
Release notes
- Version 8.5
- Changed how timeout is passed to LDAP.Search function.
- Version 7.4
- Added LDAP.SearchResult.AttributeValuesByName function.
- Version 7.0
- Fixed issue on Windows with LDAP.Search and using attribute list.
Created 15th December 2015, last changed 4th April 2019
LDAP.Rename - LDAP.SearchResult.AttributeCount
Feedback: Report problem or ask question.
Links
MBS Xojo blog