Skip to main content
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:27 AM UTC

Uniface 9: Accessing ActiveDirectory via LDAP

Accessing ActiveDirectory via LDAP

Author: None (None)

Hi community,

is here anybody who knows how to access the Windows ActiveDirectory via the Uniface LDAP driver?

I'd like to query some user information from the AD and display it in a simple form.

I would really appreciate it if anybody have some examples for me!

Thanks!

26 replies

Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:27 AM UTC

Accessing ActiveDirectory via LDAP

Author: None (None)

Hi community,

is here anybody who knows how to access the Windows ActiveDirectory via the Uniface LDAP driver?

I'd like to query some user information from the AD and display it in a simple form.

I would really appreciate it if anybody have some examples for me!

Thanks!

Hi, Please could anyone explain a bit more about Entity mapping with LDAP and how to retrieve the same. Trying it with Uniface 9.2, had setup ldap path in asn, added the driver setting, but a bit confused with her entity setup. If trying to run open command with ldap path, it opens driver successfully. However, throws Uniface -3 and ldap's LDP: Error (1) Operations error while retrieve. Or if there is any way to achieve the same via wsdl? Many Thanks


Author: dharmesh (pandey.dharmesh@gmail.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:27 AM UTC

Accessing ActiveDirectory via LDAP

Author: None (None)

Hi community,

is here anybody who knows how to access the Windows ActiveDirectory via the Uniface LDAP driver?

I'd like to query some user information from the AD and display it in a simple form.

I would really appreciate it if anybody have some examples for me!

Thanks!

cbreemer said Here is the model and form I use to test retrieve from Microsoft Exchange with the LDAP driver. ftp://ftp.compuware.com/pub/uniface/outgoing/cbr/ldap.xml Hope this helps !

Hi, this download no longer exists, is there any chance you could point me at a copy (or mail it to me? )


Author: Iain Sharp (i.sharp@pcisystems.co.uk)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:27 AM UTC

Accessing ActiveDirectory via LDAP

Author: None (None)

Hi community,

is here anybody who knows how to access the Windows ActiveDirectory via the Uniface LDAP driver?

I'd like to query some user information from the AD and display it in a simple form.

I would really appreciate it if anybody have some examples for me!

Thanks!

Uli ,

Hi John,

I just had a quick look in your archive. in the U3GL.XML export,

there is only a subsystem definition USYS, but no signatures.



Perhaps your signatures are part of the default subsystem, but you have not set the checkbox "Export default subsystem" in the export screen.


i just corrected the zip file download the U3gl Correct , Thanks


Author: jtsagara (jtsagara@logisoft.gr)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:27 AM UTC

Accessing ActiveDirectory via LDAP

Author: None (None)

Hi community,

is here anybody who knows how to access the Windows ActiveDirectory via the Uniface LDAP driver?

I'd like to query some user information from the AD and display it in a simple form.

I would really appreciate it if anybody have some examples for me!

Thanks!

Hi John,

I just had a quick look in your archive. in the U3GL.XML export,

there is only a subsystem definition USYS, but no signatures.

 

Perhaps your signatures are part of the default subsystem, but you have not set the checkbox "Export default subsystem" in the export screen.


Author: ulrich-merkel (ulrichmerkel@web.de)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:27 AM UTC

Accessing ActiveDirectory via LDAP

Author: None (None)

Hi community,

is here anybody who knows how to access the Windows ActiveDirectory via the Uniface LDAP driver?

I'd like to query some user information from the AD and display it in a simple form.

I would really appreciate it if anybody have some examples for me!

Thanks!

Hello to all ,

After your requests , i prepared a zip that contains df_3gl.xml ( a test form ) , u3gl.xml ( signature to see u3gl.dll ) , ldap.txt ( the part of c++ code that is related to ldap) , inlcudes.txt ( the included headers needed)

Basically we use two routines LDAPObjectsEnumeration that enumerates the tree structure of ldap directory and then we use LDAPGetObjectProperty to point to specified values , so for example if we want the groups from active directory :

;***************************************************************************************************************************************
;Enumerate LDAP Objects In List vaLDAPObjects
; Request    : Guid<!>Name<!>Class<!>ADsPath
; Where    : Class = organizationalunit Or group
; Sublist Seperator  : "·;"
; Recursive Enumeration : True
Call LDAPObjEnum( gsLDAPServer.GenDum1,LDAPUserName.GenDum1 ,LDAPUserPass.GenDum1 ,  %\\
    "Guid<!>GETEX[primaryGroupToken:I]<!>GETEX[name:S]<!>Class<!>ADsPath<!>GETEX[distinguishedName:S]" ,"","organizationalunit·|group","","","","",0,1,"·;" %\\
    ,vaLDAPObjects,vnReturnStatus)
;***************************************************************************************************************************************
If ( vnReturnStatus < 0 ) ;Error
 Call Fix_Size_All( (vnReturnStatus*-1) , 4,"0",1,vsErrorNo)
 Message/Error $Text("LDAPERROR%%vsErrorNO")
 ;Reset Entity From Possible RemOcc
 Call InitObject
 Call Retrieve_Ent("<MainEnityName>")
 ;Sort Entity Here Cause We Have Upper & Lower Case Compination And Read Order By Ignores That
 Sort "<MainEnityName>" , "Name"
 Call Create_Lines ("<MainEnityName>")

Else
 ;Not Kinimatografos
 vnOldCurOcc = $Curocc(<MainEnityName>)

 ;Not Empty Lines In Entity Please
 Call Remove_Lines("<MainEnityName>",2)

 ;Split The Data On Entity
 vnArrayPointer  = 1
 vsOccuranceData = ""
 ;Loop In Array Of Values Avoid GetItem Cause We Have Many = In Our Strings
 While ( vnArrayPointer <= $Number($ItemCount($Replace(vaLDAPObjects,1,"=","||",-1))) )
  vsOccuranceData = $Replace($ItemNr(vnArrayPointer , vaLDAPObjects),1,"<!>","·;",-1) 
  If (vsOccuranceData != "")
   Creocc "<MainEnityName>" , -1
   GetItem Guid.<MainEnityName> ,  vsOccuranceData , 1
   Retrieve/x "<MainEnityName>"
   GetItem PrimaryGroupToken.<MainEnityName> ,  vsOccuranceData , 2
   GetItem Name.<MainEnityName> ,  vsOccuranceData , 3
   GetItem Class.<MainEnityName> ,  vsOccuranceData , 4
   GetItem AdsPath.<MainEnityName> ,  vsOccuranceData , 5
   GetItem DistinguishedName.<MainEnityName> ,  vsOccuranceData , 6
  EndIf
  vnArrayPointer  =  vnArrayPointer + 1
 EndWhile

 ;Sort Entity
 Sort "<MainEnityName>" , "Name"

 ;Not Empty Lines In Entity Please
 Call Create_Lines("<MainEnityName>")

 ;Empty List To Free Some Ram
 vaLDAPObjects  = ""

 ;Not Kinimatografos
 SetOcc "<MainEnityName>",vnOldCurOcc
EndIf

Return (0)


if you want further information about how to build the dll please contact me


John

 

 


Author: jtsagara (jtsagara@logisoft.gr)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:27 AM UTC

Accessing ActiveDirectory via LDAP

Author: None (None)

Hi community,

is here anybody who knows how to access the Windows ActiveDirectory via the Uniface LDAP driver?

I'd like to query some user information from the AD and display it in a simple form.

I would really appreciate it if anybody have some examples for me!

Thanks!

Hi John,

I'm still having the same problems to connect to ldap with the uniface ldap-driver, so i'd really appreciate it if you publish your c++ dll or source code.

Thanks!


Author: None (None)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:27 AM UTC

Accessing ActiveDirectory via LDAP

Author: None (None)

Hi community,

is here anybody who knows how to access the Windows ActiveDirectory via the Uniface LDAP driver?

I'd like to query some user information from the AD and display it in a simple form.

I would really appreciate it if anybody have some examples for me!

Thanks!

Hi John,

i'm interested in the code.

 

TIA Uli


Author: ulrich-merkel (ulrichmerkel@web.de)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:27 AM UTC

Accessing ActiveDirectory via LDAP

Author: None (None)

Hi community,

is here anybody who knows how to access the Windows ActiveDirectory via the Uniface LDAP driver?

I'd like to query some user information from the AD and display it in a simple form.

I would really appreciate it if anybody have some examples for me!

Thanks!

Hello to all Before compuware introduce an ldap driver we had develop a c++ dll that enumerates objects from ldap and get objects property also in the same dll we have a routine that gets login user and other info. Due to limitations of ldap database driver ( max 255 , no binaries , an incorrect retrieve profile can return data that is not relevant ) still this dll is in use. The call way from uniface is signature of course. If anyone interest i can publish source code with out cost of course. John


Author: jtsagara (jtsagara@logisoft.gr)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:27 AM UTC

Accessing ActiveDirectory via LDAP

Author: None (None)

Hi community,

is here anybody who knows how to access the Windows ActiveDirectory via the Uniface LDAP driver?

I'd like to query some user information from the AD and display it in a simple form.

I would really appreciate it if anybody have some examples for me!

Thanks!

Sure. Here are the asn logicals I use to run this program. Hope it helps some. ldap_server emea-ams-dc002.emea.cpwr.corp ldap_port 389 ldap_searchbase OU=Primary,OU=Accounts,OU=Amsterdam,DC=emea,DC=cpwr,DC=corp ldap_userdn CN=Chris Breemer ldap_passwd *****


Author: None (None)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:27 AM UTC

Accessing ActiveDirectory via LDAP

Author: None (None)

Hi community,

is here anybody who knows how to access the Windows ActiveDirectory via the Uniface LDAP driver?

I'd like to query some user information from the AD and display it in a simple form.

I would really appreciate it if anybody have some examples for me!

Thanks!

Hi Theo, Pauls article looks pretty interesting. Thank you for the updated URL, Uli


Author: ulrich-merkel (ulrichmerkel@web.de)