<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Regarding the email addresses</title><link>https://www.infopathdev.com:443/forums/thread/9713.aspx</link><pubDate>Mon, 08 May 2006 23:25:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9713</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9713.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9713</wfw:commentRss><description>Thanks for sharing this with us!</description></item><item><title>Regarding the email addresses</title><link>https://www.infopathdev.com:443/forums/thread/5585.aspx</link><pubDate>Mon, 08 May 2006 09:54:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:5585</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/5585.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=5585</wfw:commentRss><description>Don't know if I should put this into the old &lt;a href='http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=554' target='_blank' title='http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=554'&lt;a target="_blank" href=http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=554&gt;http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=554&lt;/a&gt;&lt;/a&gt;thread but anyway.&lt;br /&gt;&lt;br /&gt;As I couldn't get it work I came up with another solution. I wrote a small WebService and read all members from a AD group, or better the eMail addresses of them. In my InfoPath document I populate a DDL with theses values using the connection wirzard for WebServices. Not exactly what I wanted to have but still better than nothing.&lt;br /&gt;The basics I found here &lt;a href='http://forums.asp.net/thread/1159654.aspx' target='_blank' title='http://forums.asp.net/thread/1159654.aspx'&lt;a target="_blank" href=http://forums.asp.net/thread/1159654.aspx&gt;http://forums.asp.net/thread/1159654.aspx&lt;/a&gt;&lt;/a&gt; and I tailored it to my belongings. For those who are interested here is the code I am using for my WebService:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Collections;&lt;br /&gt;using System.ComponentModel;&lt;br /&gt;using System.Data;&lt;br /&gt;using System.DirectoryServices;&lt;br /&gt;using System.Text;&lt;br /&gt;using System.Diagnostics;&lt;br /&gt;using System.Web;&lt;br /&gt;using System.Xml;&lt;br /&gt;using System.Web.Services;&lt;br /&gt;&lt;br /&gt;namespace GetADGroupMembers&lt;br /&gt;{&lt;br /&gt;	public class Service1 : System.Web.Services.WebService&lt;br /&gt;	{&lt;br /&gt;		public Service1()&lt;br /&gt;		{&lt;br /&gt;			InitializeComponent();&lt;br /&gt;		}&lt;br /&gt;&lt;br /&gt;		private IContainer components = null;&lt;br /&gt;				&lt;br /&gt;		private void InitializeComponent()&lt;br /&gt;		{&lt;br /&gt;&lt;br /&gt;		}&lt;br /&gt;&lt;br /&gt;		protected override void Dispose( bool disposing )&lt;br /&gt;		{&lt;br /&gt;			if(disposing &amp;&amp; components != null)&lt;br /&gt;			{&lt;br /&gt;				components.Dispose();&lt;br /&gt;			}&lt;br /&gt;			base.Dispose(disposing);		&lt;br /&gt;		}&lt;br /&gt;&lt;br /&gt;		//for repeating structure&lt;br /&gt;		public struct MemberMail&lt;br /&gt;		{&lt;br /&gt;			public string eMail;&lt;br /&gt;		}&lt;br /&gt;&lt;br /&gt;		[WebMethod]&lt;br /&gt;		public MemberMail[] GetMemberMail()&lt;br /&gt;		{&lt;br /&gt;			MemberMail[] mails = null;&lt;br /&gt;			&lt;br /&gt;&lt;br /&gt;			DirectoryEntry group = new DirectoryEntry(&lt;br /&gt;				"LDAP://CN=ADGroupName,OU=ThirdOU(group is in this OU),OU=SecondOU,OU=TopOU Worldwide,DC=dc1,DC=dc2,DC=dc3", //change this how you need it&lt;br /&gt;				null,&lt;br /&gt;				null,&lt;br /&gt;				AuthenticationTypes.Secure&lt;br /&gt;				);&lt;br /&gt;&lt;br /&gt;			StringBuilder sb = new StringBuilder();&lt;br /&gt;			&lt;br /&gt;			sb.Append("(|");&lt;br /&gt;&lt;br /&gt;			using (group)&lt;br /&gt;			{&lt;br /&gt;				foreach (string s in group.Properties["member"])&lt;br /&gt;				{&lt;br /&gt;					sb.AppendFormat("(distinguishedName={0})", s);&lt;br /&gt;				}&lt;br /&gt;			}&lt;br /&gt;			&lt;br /&gt;			sb.Append(")");&lt;br /&gt;&lt;br /&gt;			DirectoryEntry searchRoot = new DirectoryEntry(&lt;br /&gt;				"LDAP://dc=corp,dc=huskyims,dc=com",&lt;br /&gt;				null,&lt;br /&gt;				null,&lt;br /&gt;				AuthenticationTypes.Secure&lt;br /&gt;				);&lt;br /&gt;    &lt;br /&gt;			using (searchRoot)&lt;br /&gt;			{&lt;br /&gt;				DirectorySearcher ds = new DirectorySearcher(&lt;br /&gt;					searchRoot,&lt;br /&gt;					sb.ToString(), &lt;br /&gt;					new string[]{"mail"} // read here what ever you want e.g. nick samaccountname etc.&lt;br /&gt;					);&lt;br /&gt;        &lt;br /&gt;				using (SearchResultCollection src = ds.FindAll())&lt;br /&gt;				{&lt;br /&gt;					mails = new MemberMail[src.Count];&lt;br /&gt;					int i = 0;&lt;br /&gt;					foreach (SearchResult sr in src)&lt;br /&gt;					{&lt;br /&gt;						foreach (string key in sr.Properties.PropertyNames)&lt;br /&gt;						{&lt;br /&gt;							if(key == "adspath")&lt;br /&gt;							{&lt;br /&gt;							}&lt;br /&gt;							else&lt;br /&gt;							{&lt;br /&gt;								foreach (object o in sr.Properties[key])&lt;br /&gt;								{&lt;br /&gt;									mails&lt;i&gt;.eMail = o.ToString();&lt;br /&gt;									i++;&lt;br /&gt;								}&lt;br /&gt;							}&lt;br /&gt;						}&lt;br /&gt;					}&lt;br /&gt;				}&lt;br /&gt;				return mails;&lt;br /&gt;			}&lt;br /&gt;		}&lt;br /&gt;        }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;That's it may be someone can use it</description></item></channel></rss>