I am trying to achieve the following:
- Authenticate users against Active directory.
- If the user belongs to group "A" i want to limit user rights
- If the user belongs to group "B" i want to have some other logic in my code.
I am able to achieve the first one in the above list.
I am using forms authentication in my web application(Intranet).I did some research and there are various suggestions to use Microsoft Active Directory Application Mode (ADAM) which i m completely unaware of.Is there a way i can achieve the above with out using ADAM? Say suppose get the group list into the code and based on that can i make a call if user belongs to some group and so on..
Is is that i am thinking only on group level which limits my options? Or is there a way other than giving user access rights from group level or am i completely not understanding the concept of Active directory authentication ?
Check this question, it is the same problem though differently described: Validate a username and password against Active Directory?
Either way ActiveDirectory is fully supported within C#, no need for additional systems (I am not aware what ADAM is either).
To check the groups of a username, use this code: