GroupPrincipal GroupPrincipal GroupPrincipal GroupPrincipal Class

Definition

Encapsulates group accounts. Group accounts can be arbitrary collections of principal objects or accounts created for administrative purposes.

public ref class GroupPrincipal : System::DirectoryServices::AccountManagement::Principal
[System.DirectoryServices.AccountManagement.DirectoryRdnPrefix("CN")]
[System.Security.SecurityCritical(System.Security.SecurityCriticalScope.Everything)]
public class GroupPrincipal : System.DirectoryServices.AccountManagement.Principal
type GroupPrincipal = class
    inherit Principal
Public Class GroupPrincipal
Inherits Principal
Inheritance
GroupPrincipalGroupPrincipalGroupPrincipalGroupPrincipal
Attributes

Constructors

GroupPrincipal(PrincipalContext) GroupPrincipal(PrincipalContext) GroupPrincipal(PrincipalContext) GroupPrincipal(PrincipalContext)

Initializes a new instance of the GroupPrincipal class by using the specified context.

GroupPrincipal(PrincipalContext, String) GroupPrincipal(PrincipalContext, String) GroupPrincipal(PrincipalContext, String) GroupPrincipal(PrincipalContext, String)

Initializes a new instance of the GroupPrincipal class and assigns it to the specified context and SAM account name.

Properties

Context Context Context Context

Gets a principal context that is associated with the principal.

(Inherited from Principal)
ContextRaw ContextRaw ContextRaw ContextRaw

Gets a principal context that is associated with this principal.

(Inherited from Principal)
ContextType ContextType ContextType ContextType

Gets the context type enumeraton value that specifies the type of principal context associated with this principal.

(Inherited from Principal)
Description Description Description Description

Gets or sets the description of the principal.

(Inherited from Principal)
DisplayName DisplayName DisplayName DisplayName

Gets or sets the display name for this principal.

(Inherited from Principal)
DistinguishedName DistinguishedName DistinguishedName DistinguishedName

Gets the distinguished name (DN) for this principal.

(Inherited from Principal)
GroupScope GroupScope GroupScope GroupScope

Gets or sets a Nullable GroupScope enumeration that specifies the scope for this group principal.

Guid Guid Guid Guid

Gets the GUID associated with this principal.

(Inherited from Principal)
IsSecurityGroup IsSecurityGroup IsSecurityGroup IsSecurityGroup

Gets or sets a Nullable Boolean value that indicates whether the group is security-enabled.

Members Members Members Members

Gets a collection of principal objects that represent the members of the group.

Name Name Name Name

Gets or sets the name of this principal.

(Inherited from Principal)
SamAccountName SamAccountName SamAccountName SamAccountName

Gets or sets the SAM account name for this principal.

(Inherited from Principal)
Sid Sid Sid Sid

Gets the Security ID (SID) of the principal.

(Inherited from Principal)
StructuralObjectClass StructuralObjectClass StructuralObjectClass StructuralObjectClass

Gets the structural object class directory attribute.

(Inherited from Principal)
UserPrincipalName UserPrincipalName UserPrincipalName UserPrincipalName

Gets or sets the user principal name (UPN) associated with this principal.

(Inherited from Principal)

Methods

CheckDisposedOrDeleted() CheckDisposedOrDeleted() CheckDisposedOrDeleted() CheckDisposedOrDeleted()

Determines whether the Dispose() or Delete() methods have been called on this class. This method is called by classes that derive from this principal class.

(Inherited from Principal)
Delete() Delete() Delete() Delete()

Deletes the principal object from the store.

(Inherited from Principal)
Dispose() Dispose() Dispose() Dispose()

Disposes the current instance of the GroupPrincipal object.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Returns a Boolean value that specifies whether the supplied object is equal to the current object.

(Inherited from Principal)
ExtensionGet(String) ExtensionGet(String) ExtensionGet(String) ExtensionGet(String)

Retrieves an attribute of an extended class object.

(Inherited from Principal)
ExtensionSet(String, Object) ExtensionSet(String, Object) ExtensionSet(String, Object) ExtensionSet(String, Object)

Sets the value of an attribute in an extended class.

(Inherited from Principal)
FindByIdentity(PrincipalContext, IdentityType, String) FindByIdentity(PrincipalContext, IdentityType, String) FindByIdentity(PrincipalContext, IdentityType, String) FindByIdentity(PrincipalContext, IdentityType, String)

Returns a group principal object that matches the specified identity type, and value. This version of the FindByIdentity method determines the format of the identity value.

FindByIdentity(PrincipalContext, String) FindByIdentity(PrincipalContext, String) FindByIdentity(PrincipalContext, String) FindByIdentity(PrincipalContext, String)

Returns a group principal object that matches the specified identity value.

GetGroups() GetGroups() GetGroups() GetGroups()

Returns a collection of group objects that specify the groups of which the current principal is a member.

(Inherited from Principal)
GetGroups(PrincipalContext) GetGroups(PrincipalContext) GetGroups(PrincipalContext) 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.

(Inherited from Principal)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Retrieves the hash created from the contents of the principal object, suited for use in hashing algorithms and data structures like a hash table.

(Inherited from Principal)
GetMembers() GetMembers() GetMembers() GetMembers()

Returns a collection of the principal objects that is contained in the group.

GetMembers(Boolean) GetMembers(Boolean) GetMembers(Boolean) GetMembers(Boolean)

Returns a collection of the principal objects that is contained in the group. When the recursive flag is set to true, this method searches the current group recursively and returns all nested group members.

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
GetUnderlyingObject() GetUnderlyingObject() GetUnderlyingObject() GetUnderlyingObject()

Returns the underlying DirectoryEntry object that provides the contact data for the principal object.

(Inherited from Principal)
GetUnderlyingObjectType() GetUnderlyingObjectType() GetUnderlyingObjectType() GetUnderlyingObjectType()

Returns the underlying object type.

(Inherited from Principal)
IsMemberOf(GroupPrincipal) IsMemberOf(GroupPrincipal) IsMemberOf(GroupPrincipal) IsMemberOf(GroupPrincipal)

Returns a Boolean value that specifies whether the principal is a member of the specified group.

(Inherited from Principal)
IsMemberOf(PrincipalContext, IdentityType, String) IsMemberOf(PrincipalContext, IdentityType, String) IsMemberOf(PrincipalContext, IdentityType, String) IsMemberOf(PrincipalContext, IdentityType, String)

Returns a Boolean value that specifies whether the principal is a member of the group specified by identity type and value.

(Inherited from Principal)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Save() Save() Save() Save()

Saves the changes that were made on the principal object to the store. If this is a new principal object, this method inserts it into the store.

(Inherited from Principal)
Save(PrincipalContext) Save(PrincipalContext) Save(PrincipalContext) Save(PrincipalContext)

Saves the changes that were made on the principal object to the store. If this is a new principal object, this method inserts it into the specified context. If the principal has already been persisted, it is moved from the original context to the specified context.

(Inherited from Principal)
ToString() ToString() ToString() ToString()

Returns a user friendly string representation of the current principal object.

(Inherited from Principal)

Applies to