Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADSI & [non custom] exchange fields

Status
Not open for further replies.

RhythmAddict112

Programmer
Jun 17, 2004
625
US
Hi all..does someone have a link to a list of the standard exchange fields? I need to grab the email address from exchange...


is the link that states how to do this, but my issue is...when I grab the mail address using the "mail" (primary SMTP) field, I get an address in this format

userName@Domain.com

Which is valid, however our external address are..

firstName.lastName@domain.com, which is the email I need to grab...is there a standard field for this? And jsut for kicks, is there a complete list of exchange fields somewhere?

Thanks in advance.
 
Sup Drex.

Yeah, I saw that page, but pulling none of those fields will give me the email in the format I need it in ;-(

The kicker is...I know it's in exchange in that format, because I can see it when I access outlook properties. Bad thing is, there isn't any way Im going to be able to get a list of the custom fields in exchange/LDAP....So i'm hoping its in "standard" field somewhere...Just can't find it.

The other kink is, normally I'd just grab the firstName, and the last name and form the email address - but the entire reason Im doing this is to avoid duplicate last names wehre the email address format follows...
Bob.Green@domain.com
Ted.Green1@domain.com etc...

in short, dupe last names are appended with an incremented number ( as im sure they are in most places )

any other thoughts on how I could find out the fields? I rememebr awhile ago...I saw some code that would list the columns in a table...is there a way for me to do that?

thanks for your help!
 
Using the "adsiedit.msc" tool( you can expose the "X400" email property of any user with an email account, just double-click one and it will give you the "LDAP://" path to reach that object - provided your Exchange server uses the default "recipient policy" which automagically creates X400 records.

To dump all to a db, use VB or ASP page with VBScript connections to the DC via that "LDAP://" call (edited to use a VAR for the "cn=username" chunk), - loop thru the entire "cn=Users" container until EOF for all email addresses. Just don't forget to 'bind' to your LDAP provider.
Bent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top