System Features:
- Infopath 2007 with C # code
- Webservices
- Active Directory
I need to get the username (first and last name) from the active directory, but the user does not have permission to read active directory lists.
What permissions are needed to enable the user to search for AD
I use code like this
SearchResult result;
using (DirectoryEntry de = new DirectoryEntry("LDAP://DC=contoso,DC=com,DC=au"))
{
DirectorySearcher search = new DirectorySearcher(de, (string.Format("(&(objectClass=user)(mailNickname={0}))",this.Application.User.UserName)));
result = search.FindOne();
}
I looked at creating a web service that receives the required information, but this seems redundant, but you need to get around that every possible user of the form must have the correct permissions
EDIT:
, , - infopath. - . , . , . , .