Returns a collection of group objects that specify the groups of which the current principal is a member.
This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.
|GetGroups()||Returns a collection of group objects that specify the groups of which the current principal is a member.|
|GetGroups(PrincipalContext)||Returns a collection of group objects that the principal is a member of and that exist in the store provided by the specified context parameter.|
This overloaded method only returns the groups of which the principal is directly a member; no recursive searches are performed. Recursive search results are available for user principal objects. For more information, see the GetAuthorizationGroups method.
If the principal store is AD DS, the list of groups contains the user's primary group that is identified by the primary group ID attribute in the AD DS object.