I have an app that forces Windows Auth. I'll describe below the set up, I want to be able to modifiy my menu based on the AD group that the logged in user is in. I have 2 groups allowed into the app at all, 1 group needs to see certain pages and the other group needs to see other pages (with some overlap).
I basically want to know from a web forms code behind what group they are in so I can act accordingly, is this possible???
I'm successfully using "Page.User.Identity.Name" to get the logged in user, just now need to know if there are in a specific AD group or not...
<authorization><allow roles="ADGroup1, ADGroup2" /><deny users="*" /></authorization>
I'm using the above which allows only users in either ADGroup1 or ADGroup2 into the app.
I know I can rescrict page access using:
<location path="page1.aspx"><system.web><authorization><allow users="ADgroup1"/><deny users="*" /></authorization></system.web></location>
But I need to know if a user is in a group or not to modify my menu...