Tasked with creating a login page that would allow members of two specific groups access to some controllers and actions in an MVC project, I set about to create a role provider for AD. I managed to get it configured with forms authentication, and to enumerate the groups to which an authenticated user belongs in AD.
It turns out, however, that the groups I was asked to set this up for, are not AD groups. I see lots of groups, but not the ones in question.
The request was based on the fact that these groups show up in the global address book from Exchange, but there doesn't seem to be a 1:1 relationship.
Is there any relationship?
UserPrincipal.GetAuthorizationGroups()
, when the groups in question were distribution groups. CallingUserPrincipal.GetGroups()
returns them all. Post an answer and I'll accept. – Cleavers