Thanks Mr Vodia PBX.
In case anyone else is interested, we did get LDAP going in a .Net Desktop app, based off the Powershell script below.
We can get a list of Names (cn), Numbers(telephoneNumber) and Company with this. (Probably more.)
We will look at extending functionality with the REST Api down the track.
Thanks for your input.
# Needs reference to .NET assembly used in the script.
Add-Type -AssemblyName System.DirectoryServices.Protocols
$username = '<YourPBXsURL.comcom\AccountNo>'
$pwd = '<AccountsLDAPPasswprd>'
$server = "<YourPBXsURL.comcom>"
$port = "<YourPBXsLDAPPort" #Normally 389
$password = $pwd | ConvertTo-SecureString -asPlainText -Force
# Top Level OU under which users are located
$ldapSearchBase = "ou=people"
# Filter to find the user we are connecting with
$ldapSearchFilter = "(&(objectClass=*))"
# Username and Password
$ldapCredentials = New-Object System.Net.NetworkCredential($username,$password)
# Create a Connection
$ldapConnection = New-Object System.DirectoryServices.Protocols.LDAPConnection("$($server):$($port)",$ldapCredentials,"Basic")
# Connect and Search
$ldapTimeOut = new-timespan -Seconds 30
$ldapRequest = New-Object System.DirectoryServices.Protocols.SearchRequest($ldapSearchBase, $ldapSearchFilter, "OneLevel", $null)
$ldapResponse = $ldapConnection.SendRequest($ldapRequest, $ldapTimeOut)
$ldapResponse.Entries[0].Attributes