查找出来,如果​​一组AD是在通讯组? [英] Find out if a group in AD is in Distribution group?

查看:338
本文介绍了查找出来,如果​​一组AD是在通讯组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用ASP.net C#和有关于Active Directory中一个很小的想法。我已经被赋予了任务,在下面的步骤写一个程序:

I'm using ASP.net with C# and have a very little idea about Active Directory. I've been given a task to write a program in steps below:

在ASP.net应用程序被赋予一个用户的用户名。

The ASP.net application is given the username of a user.

应用程序应查询用户的所有组与给定的用户名。

The application should query all the groups of the user with the given username.

然后应用程序应在两个单独的列表之一组成的分布组及其他列表显示这些基团,所述基团的其余部分。

Then the application should display these groups in two separate lists one consisting of the distribution groups and in other list, the rest of the groups.

现在,所述查询所有组是容易的。但是,我怎么能检查组是否在通讯组或不?

Now, the querying for all the groups is easy. But how can I check whether the group is in distribution group or not?

我还没有被赋予了更多的信息。

I have not been given more information.

任何属性或东西我可以检查???

Any attribute or something I can check???

请帮助我。在此先感谢...

Please help me. Thanks in advance...

推荐答案

您可以retreive从所谓的狮型(最后一行)。

You can retreive this information from an attribute called Groupe-Type(last line).

(0x00000001) : Specifies a group that is created by the system.
(0x00000002) : Specifies a group with global scope.
(0x00000004) : Specifies a group with domain local scope.
(0x00000008) : Specifies a group with universal scope.
(0x00000010) : Specifies an APP_BASIC group for Windows Server Authorization Manager.
(0x00000020) : Specifies an APP_QUERY group fir Windows Server Authorization Manager.
(0x80000000) :Specifies a security group. If this flag is not set, then the group is a distribution group.

您可以在<一个发现href="http://stackoverflow.com/questions/6252819/find-recursive-group-membership-active-directory-using-c-sharp/6289205#6289205">this回答或在<一的钮href="http://stackoverflow.com/questions/7648692/can-i-match-a-user-to-a-group-accross-different-domains/7794945#7794945">this另一种的不同方式中检索用户所属的组。

You can find in this answer or at the botton of this other one different ways to retreive groups a user belongs to.

您可以找到<一href="http://stackoverflow.com/questions/6864582/asp-net-get-data-from-ad-about-user/6864697#6864697">here如何中检索用户。

You can find here how to retreive user.

这篇关于查找出来,如果​​一组AD是在通讯组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆