|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Get the user emailI'm building a windows application in csharp and I'd like to know if there is
a way to filter the search by the user email address in AD? Thanks! The filter would look like:
(mail=u***@domain.com) This assumes you want to find the user by their email address. If you want to find the user's email address and know the login name or something, the filter would be different. Joe K. Show quoteHide quote "tangolp" <tang***@discussions.microsoft.com> wrote in message news:2C007A43-7FA2-485C-BAF6-972233159FEF@microsoft.com... > I'm building a windows application in csharp and I'd like to know if there > is > a way to filter the search by the user email address in AD? Thanks! Thank you Joe for your reply.
Is it possible to get the user AD information like groups, first name, last name, etc.. by passing only the user id? Or I need user id and password? Any code sample would be helpful. Thanks. Show quoteHide quote "Joe Kaplan (MVP - ADSI)" wrote: > The filter would look like: > > (mail=u***@domain.com) > > This assumes you want to find the user by their email address. If you want > to find the user's email address and know the login name or something, the > filter would be different. > > Joe K. > > "tangolp" <tang***@discussions.microsoft.com> wrote in message > news:2C007A43-7FA2-485C-BAF6-972233159FEF@microsoft.com... > > I'm building a windows application in csharp and I'd like to know if there > > is > > a way to filter the search by the user email address in AD? Thanks! > > > It is possible to search for the user in AD given only their username and
you can get all of this information (although groups can be tricky). However, you need a security context that has rights to access AD. If you want to access AD using the user's own security context, you either need their plain text credentials or a Windows security token that you can use to impersonate them and access AD. If you want to use a different account to access AD, then any valid service account that has the rights you need will do. So, it depends on what your model for accessing AD is. There are lots of code samples in the System.DirectoryServices SDK topic in MSDN. Joe K. Show quoteHide quote "tangolp" <tang***@discussions.microsoft.com> wrote in message news:627BCDDA-0965-4A3F-9CCA-FC90EEDA061D@microsoft.com... > Thank you Joe for your reply. > > Is it possible to get the user AD information like groups, first name, > last > name, etc.. by passing only the user id? Or I need user id and password? > Any code sample would be helpful. Thanks. > > "Joe Kaplan (MVP - ADSI)" wrote: > >> The filter would look like: >> >> (mail=u***@domain.com) >> >> This assumes you want to find the user by their email address. If you >> want >> to find the user's email address and know the login name or something, >> the >> filter would be different. >> >> Joe K. >> >> "tangolp" <tang***@discussions.microsoft.com> wrote in message >> news:2C007A43-7FA2-485C-BAF6-972233159FEF@microsoft.com... >> > I'm building a windows application in csharp and I'd like to know if >> > there >> > is >> > a way to filter the search by the user email address in AD? Thanks! >> >> >>
[ANN][X-POST] Goliath.NET Obfuscator...
Implementing Kerberos Authentication Limiting exe permissions signcode vs signtool Impossible to set security policy for VSTO Excel? accessing Active Directory .NET 2003 DLL - how secure? authentication hangs after security patch XmlSerializer : CS0647 Compilation Error dll Licensing package? Need to protect my API's |
|||||||||||||||||||||||