You can use an ADO search. Here is an untested code snippet I found on my workstation
; Use ADO to QUERY Active Directory
ADS_SCOPE_SUBTREE = 2 ; or use ADS_SCOPE_ONELEVEL = 1
objConnection = CreateObject("ADODB.Connection")
objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open("Active Directory Provider")
objCommand.ActiveConnection = objConnection
objCommand.Properties("Page Size") = 1000
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
; Domuserpath is the full ADSI path to searches start point in the directory.
objCommand.CommandText = "SELECT Name FROM '": domusrpath :"' WHERE objectCategory='group'"
objRecordSet = objCommand.Execute()
grouplist = ""
If objRecordSet.RecordCount
objRecordSet.MoveFirst
While !objRecordSet.EOF
groupname = objRecordSet.Fields("Name").Value
grouplist = grouplist : @TAB: groupname
objRecordSet.MoveNext
EndWhile
AskItemlist(userid: ' Group list', StrTrim( grouplist ), @TAB, @UNSORTED, @SINGLE )
Else
Pause(userid: ' Group list', 'No records found')
EndIf
There are more examples in the Tech Database. You can mix and match COM based and extender based access to Active directory so that is not a worry.
IIRC, we have never has a request to add one level search capabilities to dsFindPath before. Will have to add it the feature request list.