Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to determine whether a group is security group?

I need to check whether a group given by name is a security group in AD using C# code. I notice there's a property named "groupType" in groups properties, but I don't know what this property is used for. I checked several groups and find its value can be null, 8 or -2147483646. Is it associated with the security group type? I also find in the distinguishedName of the group, there can be "OU=Security Group" or "OU=Secuity Group with Mail Lists" blabla. Can it be a criteria to determine security group type? Thanks in advance.

like image 819
Chris Li Avatar asked Oct 18 '25 13:10

Chris Li


1 Answers

From http://adsearch-winzero.blogspot.com/2006/04/object-group-attribute-grouptype.html

The groupType attribute returns the type of group. However the returned value is in RAW format.

...

-2147483646 ~ Global Security Group
-2147483644 ~ Local Security Group
-2147483643 ~ BuiltIn Group
-2147483640 ~ Universal Security Group

2 ~ Global Distribution Group
4 ~ Local Distribution Group
8 ~ Universal Distribution Group
like image 98
Matt Avatar answered Oct 21 '25 11:10

Matt