1

I am totally new to this topic, and I've seen many other related topics about this, but how can I go about using Active Directory to validate a username and password based on which OU a user is in?

I am developing an app in Visual Studio using windows forms. Are there any libraries I need? Any preliminary details?

Again, I'm very new to this, so any and all information would be appreciated

gonavy96
  • 81
  • 1
  • 6
  • Have you tried suggestions here: https://stackoverflow.com/questions/290548/validate-a-username-and-password-against-active-directory – default locale Jul 20 '17 at 03:49
  • Yes actually. How can I include System.DirectoryServices? – gonavy96 Jul 20 '17 at 03:53
  • I've tried but it doesn't appear to be included with my Visual Studio and I don't know what to download to get that namespace – gonavy96 Jul 20 '17 at 03:53
  • https://stackoverflow.com/questions/265096/system-directoryservices-is-not-recognised-in-the-namespace-system#14148434 – default locale Jul 20 '17 at 03:54
  • If you could add your response as an actual answer I'd love to give you an upvote – gonavy96 Jul 20 '17 at 04:14
  • Possible duplicate of [Validate a username and password against Active Directory?](https://stackoverflow.com/questions/290548/validate-a-username-and-password-against-active-directory) – default locale Jul 20 '17 at 04:14
  • Thanks, but the answer was already posted. I marked this question as a duplicate to aid future users. – default locale Jul 20 '17 at 04:18
  • I do have one more question though (this solution helped big time!) How can I specify by organizational unit? – gonavy96 Jul 20 '17 at 04:38
  • `OU` is just a part of a query. Also, you can [search for questions](https://stackoverflow.com/questions/tagged/ldap%20c%23?mode=all) here and at Google :) Usually, there are similar questions: https://stackoverflow.com/questions/7721696/c-sharp-ldap-query-to-retrieve-all-users-in-an-organisational-unit , https://stackoverflow.com/questions/6452531/querying-an-ldap – default locale Jul 20 '17 at 04:50

0 Answers0