Nogo Posted November 7, 2012 Posted November 7, 2012 (edited) Hello I'm trying to get email from AD with _AD_GetObjectAttribute. the following script gives back email adress for given sAMAccountName: #include <AD.au3> Global $aProperties _AD_Open() If @error Then Exit MsgBox(16, "Active Directory Example Skript", "Function _AD_Open encountered a problem. @error = " & @error & ", @extended = " & @extended) $aProperties = _AD_GetObjectAttribute("anysAMAccountName", "mail") ClipPut($aProperties) MsgBox(0,"",$aProperties) _AD_Close() Tried many sAMAccountName's it works good, but on one Name 'XiaopenL' result is: '$FUNCTION.CONET_JS_toLowerCase($FUNCTION.CONET_JS_CheckEMail($FUNCTION.CONET_JS_changeUmlaut($FUNCTION.CONET_JS_getFirstPart(Lu)$$)$$.$FUNCTION.CONET_JS_changeUmlaut($FUNCTION.CONET_JS_getFirstPart(Xiaopeng)$$)$$@xxx.xx!!99999999)$$)$$' This is not the mail adress. Is it a failure of the AD-server? Edited November 7, 2012 by Nogo
water Posted November 7, 2012 Posted November 7, 2012 Please a look at this site. It describes attributee mail and proxyAddresses.Could you get the values of attribute "proxyAddresses"? Be aware that it is a multivalue attribute and hence _AD_GetObjectAttribute returns an array. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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
Nogo Posted November 7, 2012 Author Posted November 7, 2012 (edited) Could you get the values of attribute "proxyAddresses"?No it is not set.But I've downloaded 'Active Directory Explorer'. -> The mail adress of sAMAccountName "XiaopenL" is set to$FUNCTION.CONET_JS_toLowerCase($FUNCTION.CONET_JS_CheckEMail($FUNCTION.CONET_JS_changeUmlaut($FUNCTION.CONET_JS_getFirstPart(Lu)$$)$$.$FUNCTION.CONET_JS_changeUmlaut($FUNCTION.CONET_JS_getFirstPart(Xiaopeng)$$)$$@xxx.xx!!99999999)$$)$$So everything is working ok. The Database is not tended right.I didn't expected that this is the failure.Many thanks for your help and for the link. Edited November 7, 2012 by Nogo
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now