Active Directory 组和 Exchange 中的组之间有什么关系(如果有)?
我的任务是创建一个登录页面,允许两个特定组的成员访问 MVC 项目中的某些控制器和操作,我开始为 AD 创建一个角色提供程序。我设法使用表单身份验证对其进行配置,并枚举经过身份验证的用户在 AD 中所属的组。
然而,事实证明,要求我设置此功能的组并不是 AD 组。我看到了很多团体,但没有看到有问题的团体。
该请求基于以下事实:这些组显示在 Exchange 的全局通讯簿中,但似乎不存在 1:1 关系。
有任何关系吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Active Directory 中有两种类型的组:通讯组列表和安全组。安全组用于 ACL,而通讯组列表主要用于电子邮件列表和其他非 ACL 相关的内容。
请注意,与 UserPrincipal.GetAuthorizationGroups() 不同,UserPrincipal.GetGroups() 仅返回用户所属的直接组。如果 GroupA 包含 GroupB 并且 GroupB 包含 UserX,则 userX.GetGroups() 仅返回 GroupB,而不返回 GroupA。
顺便说一句,.NET 3.5 SP1 中存在错误。 UserPrincipal.GetGroups() 可能无法正常工作,您可能需要查看此修补程序 http://support.microsoft .com/kb/969166
There are two type of groups in Active Directory, distribution list and security group. Security group is used in the ACL while the distribution list is used mainly in the email list and other non-ACL related stuff.
Beware that unlike UserPrincipal.GetAuthorizationGroups(), UserPrincipal.GetGroups() returns only the immediate group that an user belongs to. If GroupA contains GroupB and GroupB contains UserX, userX.GetGroups() returns GroupB only but not GroupA.
Just a side note, there are bugs in .NET 3.5 SP1. UserPrincipal.GetGroups() may not work properly, you may like to check out this hotfix http://support.microsoft.com/kb/969166