AD Login with C#


  • Hello I have asked this question a couple of times. I posted it here and it was removed or something because its suppose to be in the asp forum and over at the asp forum they say its suppose to be in the C# forum. This is suppose to be in the C# forum because the code I am having the issue with is C# and not asp or html. I am attempting to use the following article to tie into AD for login. If you can help great if not please do not reply simply to tell me this belongs in the ASP for because again the code that is the problem is the C# code. 

    My issue is I can get to code to work and I authenticate properly, but I only want one group able to authenticate to this and not my entire AD tree. Can someone please tell me how to only allow a specified group to authenticate

    Wednesday, January 03, 2018 7:36 PM

All replies

  • Hi Quarinteen,

    Thank you for posting here and sorry for late reply..

    For your question, I do a lot of test. When I am a user of AD, I could login into the AD in any group of AD. I do not find the way to limit specific group to login into the AD directly.

    But you could try to limit in computer configuration. For more details, you could try the way below to edit the policy.

    Best Regards,


    Note: This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as a convenience to you. 
    Microsoft does not control these sites and has not tested any software or information found on these sites; Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.
    There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet. 

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Monday, January 08, 2018 1:32 AM