Click here to Skip to main content
15,888,401 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi.

I have created a webpage with a dropdown box for groups such as: Sales, Purchase etc.

I have seen a lot of examples, but I would like in a simple way to introduce AD authentication and get the group, so if a person from sales logs in only the sales dropdown should be selected.

How do I make a simple AD authentication?
Posted
Comments
ZurdoDev 9-Nov-15 8:02am    
You don't want AD authentication, you need to query ad for the groups the user belongs to.
Member 11971472 16-Nov-15 3:59am    
And how would I do that?
ZurdoDev 16-Nov-15 7:12am    
Using System.DirectoryServices, if memory serves me correctly. Just google c# active directory group of user or something like that.
Member 11971472 29-Jan-16 8:44am    
Can anyone provide me with some code for this? Can the Windows Username be used, so they do not need to enter the login details twice. They login when they start the day pc each day.

Then when the website is entered a query to AD should be made for the user so users belonging to department sales only can see the sales dropdown item.

I appreciate all the help I can get with code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900