Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
How to get email adresses from active directory
meikel
Hi,
my customer uses active directory for user-administration.
hope, it works within the workflow :-)
emailtasks can only send mails to user i decided, correctly?
Now I want to send an email to all members of a specific group. maybe in an external task.
Is there a way to read email adresses from the activedirectory server with perl or a CLT?
What about iwgetldapusers?
regards
meikel
Find more posts tagged with
Comments
Adam Stoller
ActiveDirectory is essentially like a DB (IMO) and as such there is no one-way to organize it, and thus there is no CLT provided OOTB to do what you are trying to do.
However, you can certain code up the queries to perform the kind of lookup you are suggesting.
Unfortunately, I don't have any code examples to share for this (it may sound like a funny excuse, but the code examples I do have are on my other laptop) - sorry.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Graph.ssd.zip
Graph.pdf
Gregg Faus
It's funny that you ask this question. In our initial deployment of TeamSite I had asked a similar question: how do I get the e-mail address for an active directory user. So I then proceed to write a window scripting host file to find this out. I've posted my solution which can be called from the command line.
Just change the lines in the .vbs file that reflect our own AD implemention to yours:
strQuery = "SELECT Mail FROM 'LDAP://OU=teamsite,OU=services,OU=,DC= .....'
In fact I query two separate OU's because users can be located in either. You will have to modify to suit your own needs.
You also need to change the case on line 76 where no username is found. Here I just assume that no e-mail is found and use a FirstName.LastName convention for the user part of the e-mail address (e.g.
user.name@company.com
).
Hope that helps.
- gf