You just need to know the names of the attributes that store those =
values. Based on the syntax you have below, you can get the additional =
values using the same syntax as you used for displayName.
I'd suggest using a tool like ldp.exe or ADSI Edit to view all of the =
available AD data for a user and figure out what all the attribute names =
are. Then, you can translate that to your code.
If you want to do queries against AD instead of binding to specific =
objects, you should use the DirectorySearcher.
Most of the support for this stuff goes on in =
microsoft.public.adsi.general (.NET and COM). Also, there's good stuff =
in the Directory Services SDK documentation in MSDN.
Joe K.
[quoted text, click to view] "Mike" <nospam@nospam.com> wrote in message =
news:eJwgGsGcEHA.4032@TK2MSFTNGP11.phx.gbl...
Thanks Joe. I can now see the various properties.
Is there a possibility to query the Active Directory to gather some =
information about the user (group, phone, etc.)? How can I do that?
Thanks.
Mike
"Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> =
[quoted text, click to view] wrote in message news:eY5PbwDcEHA.3460@TK2MSFTNGP10.phx.gbl...
In order to use an unqualified username, you must specify =
AuthenticationTypes.Secure (which you should do anyway to ensure that =
your credentials are encrypted on the network). You can also use the =
upn syntax (user@domain.com) or NT Logon format (domain\user) with or =
without AuthenticationTypes.Secure.
Joe K.
[quoted text, click to view] "Mike" <nospam@nospam.com> wrote in message =
news:OTui1IDcEHA.2008@TK2MSFTNGP10.phx.gbl...
Hi,
I am trying to bind to an Active Directory server using the =
following snippet, but I always get a user unknown or bad password error =
message.=20
DirectoryEntry de =3D new =
DirectoryEntry(LDAP://srv-dell.waysoft.local);
de.AuthenticationType =3D AuthenticationTypes.ServerBind;
de.Username =3D "administrator";
de.Password =3D "password";
string usr =3D de.Properties["DisplayName"].Value.ToString(); =
// the error message appears here
Any idea of what is wrong?
Thanks.