Jump to content

LDAP help


Recommended Posts

Hi Guys,

I would like to extract some information from our LDAP - username and terminationdate, But i am having issues writing the LDAP query

Host=test.com

Port=636

Base= uid=user1@test.net,ou=People,o=test1.com

Scope=base

Filter= objectclass=* 

 

Can anyone give me a small example based on the above info?

I tried with _AD_GetObjectsInOU(....)

and

Local     $oDS,$oUsr
$oDS = ObjGet("LDAP:// ..... )
    $oUsr = $oDS.GetObject("People", "cn=username")
    MSGBOX (0,"", $oUsr.terminationdate)

But didn't get anything.

Link to comment
Share on other sites

Which directory do you try to access? Looks like it isn't Active Directory.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

I try to get the LDAP  directory model.  The fields i want are not existing in the AD 'people accounts'. I extract all fields with _AD_GetObjectProperties and 'terminationdate' is not there.

Link to comment
Share on other sites

LDAP is a protocol. The directory model depends on the Software you use (Active Directory etc.)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Ok, how do i accomplish that using the AD UDF ?

BASE DN=  "ou=people,o=test.com'

I tried with
 

_AD_Open("user", "pass")
$mail2 = "CN="& StringStripWS($mail[$i],8) & ",OU=BG,OU=Users,OU=Accounts,DC=....,DC=....,DC=com"
$test2 = _AD_GetObjectProperties(_AD_FQDNToSamAccountName($mail2)
_AD_GetObjectProperties($test2)

It works , but the field i am interested in is missing. Do i need to use more parameters in AD open or what?

Link to comment
Share on other sites

If _AD_GetObjectProperties does not return the required property then it either has never been set for the object or it is not available on the domain controller you connected to.
Maybe if you access the Global Catalog by using additional parameters.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...