Get user email address from active directory
Need to get users email address from active directoy. I try to use System.DirectoryServices.AccountManagement. But I have problem to add the reference. I found someone else also post the same problem http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=133862. There is response. I am usin SSIS Development Studio 2008 with .net 3.5 sp1. This is a SharePoint 2010 server so .net 4.0 is also installed. Please advice. Many thanks.
October 20th, 2011 11:48am

Thank you for your response. I tried to use the following code to get user's email address so I need to reference System.DirectoryServices.AccountManagement . I am working on a Windows 2008 (sp1) server. PrincipalContext ctx = new PrincipalContext(ContextType.Domain, "dcname"); UserPrincipal u = new UserPrincipal(ctx); u = UserPrincipal.FindByIdentity(ctx, UserName);
Free Windows Admin Tool Kit Click here and download it now
October 21st, 2011 4:23pm

To pull information from AD you can use a simple C# script like this: http://dataqueen.unlimitedviz.com/2012/09/get-around-active-directory-paging-on-ssis-import/ Cheers, Martina Martina White
September 12th, 2012 1:40pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics