Link to home
Start Free TrialLog in
Avatar of maytawn
maytawn

asked on

Active Directory / LDAP Question

I have an LDAP query that gathers the memberOf attributes for a particular user.  I want to know if there is a way to distinguish between distribution groups and security groups.  I would like to only gather the security groups for a particular user but I'm currently also getting the distribution groups too, which I don't want.
ASKER CERTIFIED SOLUTION
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of maytawn
maytawn

ASKER

This looks good.  So it looks like I will need to query each group to determine its type.  Can you explain this line a little more.

"If intGroupType And ADS_GROUP_TYPE_SECURITY_ENABLED Then"

Also, can you point me toward some documentation that provides a more detailed explaination of how groups are distinguished.  i.e. why do security groups tend to have long negative numbers as their value.
Avatar of maytawn

ASKER

The answer listed above ouputs correct results, but there is no explanation as to how I can distinguish between the two types.  I asked for clarification, but have not received any.  I would be agreeable to awarding partial points... but certainly not full points.