AuthenticablePrincipal AuthenticablePrincipal AuthenticablePrincipal AuthenticablePrincipal Class

Definition

Encapsulates the account and contact data common to principals that can be authenticated.

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

Constructors

AuthenticablePrincipal(PrincipalContext) AuthenticablePrincipal(PrincipalContext) AuthenticablePrincipal(PrincipalContext) AuthenticablePrincipal(PrincipalContext)

Initializes a new instance of the AuthenticablePrincipal class by using the specified context. This constructor is called by derived-class constructors to initialize the base class and is not intended for use directly from your code.

AuthenticablePrincipal(PrincipalContext, String, String, Boolean) AuthenticablePrincipal(PrincipalContext, String, String, Boolean) AuthenticablePrincipal(PrincipalContext, String, String, Boolean) AuthenticablePrincipal(PrincipalContext, String, String, Boolean)

Initializes a new instance of the AuthenticablePrincipal class by using the specified context, SAM account name, password, and enabled value. This constructor is called by derived-class constructors to initialize the base class and is not intended for use directly from your code.

Properties

AccountExpirationDate AccountExpirationDate AccountExpirationDate AccountExpirationDate

Gets or sets a Nullable DateTime that specifies the date and time that the account expires.

AccountLockoutTime AccountLockoutTime AccountLockoutTime AccountLockoutTime

Gets the Nullable DateTime that specifies the date and time that the account was locked out.

AdvancedSearchFilter AdvancedSearchFilter AdvancedSearchFilter AdvancedSearchFilter

Returns an AdvancedFilters object for use with Query By Example to set read-only properties before passing the object to the PrincipalSearcher.

AllowReversiblePasswordEncryption AllowReversiblePasswordEncryption AllowReversiblePasswordEncryption AllowReversiblePasswordEncryption

Gets or sets a Boolean value that specifies whether reversible password encryption is enabled for this account.

BadLogonCount BadLogonCount BadLogonCount BadLogonCount

Gets the number of logon attempts using incorrect credentials for this account.

Certificates Certificates Certificates Certificates

Gets a X509Certificate2Collection that contains the X509 certificates for this account.

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 enumeration value that specifies the type of principal context associated with this principal.

(Inherited from Principal)
DelegationPermitted DelegationPermitted DelegationPermitted DelegationPermitted

Gets or sets a Nullable Boolean value that specifies whether the account may be delegated.

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)
Enabled Enabled Enabled Enabled

Gets or sets a Nullable Boolean value that specifies whether this account is enabled for authentication.

Guid Guid Guid Guid

Gets the GUID associated with this principal.

(Inherited from Principal)
HomeDirectory HomeDirectory HomeDirectory HomeDirectory

Gets or sets the home directory for this account.

HomeDrive HomeDrive HomeDrive HomeDrive

Gets or sets the home drive for this account.

LastBadPasswordAttempt LastBadPasswordAttempt LastBadPasswordAttempt LastBadPasswordAttempt

Gets the Nullable DateTime that specifies the date and time of the last incorrect password attempt on this account.

LastLogon LastLogon LastLogon LastLogon

Gets the Nullable DateTime that specifies the date and time of the last logon for this account.

LastPasswordSet LastPasswordSet LastPasswordSet LastPasswordSet

Gets the Nullable DateTime that specifies the last date and time that the password was set for this account.

Name Name Name Name

Gets or sets the name of this principal.

(Inherited from Principal)
PasswordNeverExpires PasswordNeverExpires PasswordNeverExpires PasswordNeverExpires

Gets or sets a Boolean value that specifies whether the password expires for this account.

PasswordNotRequired PasswordNotRequired PasswordNotRequired PasswordNotRequired

Gets or sets a Boolean value that specifies whether a password is required for this account.

PermittedLogonTimes PermittedLogonTimes PermittedLogonTimes PermittedLogonTimes

Gets or sets the times when the principal can logon.

PermittedWorkstations PermittedWorkstations PermittedWorkstations PermittedWorkstations

Gets the list of workstations that this principal is permitted to log into.

SamAccountName SamAccountName SamAccountName SamAccountName

Gets or sets the SAM account name for this principal.

(Inherited from Principal)
ScriptPath ScriptPath ScriptPath ScriptPath

Gets or sets the script path for this account.

Sid Sid Sid Sid

Gets the Security ID (SID) of the principal.

(Inherited from Principal)
SmartcardLogonRequired SmartcardLogonRequired SmartcardLogonRequired SmartcardLogonRequired

Gets or sets a Boolean value that specifies whether a smartcard is required to log on to the account.

StructuralObjectClass StructuralObjectClass StructuralObjectClass StructuralObjectClass

Gets the structural object class directory attribute.

(Inherited from Principal)
UserCannotChangePassword UserCannotChangePassword UserCannotChangePassword UserCannotChangePassword

Gets or sets a Boolean value that specifies whether the user can change the password for this account. Do not use this with a ComputerPrincipal.

UserPrincipalName UserPrincipalName UserPrincipalName UserPrincipalName

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

(Inherited from Principal)

Methods

ChangePassword(String, String) ChangePassword(String, String) ChangePassword(String, String) ChangePassword(String, String)

Changes the account password from the old password to the new password. Do not use this with a ComputerPrincipal.

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 Principal object.

(Inherited from Principal)
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)
ExpirePasswordNow() ExpirePasswordNow() ExpirePasswordNow() ExpirePasswordNow()

Expires the password for this account. This will force the user to change his/her password at the next logon.

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)
FindByBadPasswordAttempt(PrincipalContext, DateTime, MatchType) FindByBadPasswordAttempt(PrincipalContext, DateTime, MatchType) FindByBadPasswordAttempt(PrincipalContext, DateTime, MatchType) FindByBadPasswordAttempt(PrincipalContext, DateTime, MatchType)

Returns a collection of authentication principal objects that have an incorrect password try recorded in the specified date and time range.

FindByBadPasswordAttempt<T>(PrincipalContext, DateTime, MatchType) FindByBadPasswordAttempt<T>(PrincipalContext, DateTime, MatchType) FindByBadPasswordAttempt<T>(PrincipalContext, DateTime, MatchType) FindByBadPasswordAttempt<T>(PrincipalContext, DateTime, MatchType)

Returns a PrincipalSearchResult<T> collection of objects that have a bad password attempt within the specified date and time range. This is the template function for extended classes that wish to implement this functionality.

FindByExpirationTime(PrincipalContext, DateTime, MatchType) FindByExpirationTime(PrincipalContext, DateTime, MatchType) FindByExpirationTime(PrincipalContext, DateTime, MatchType) FindByExpirationTime(PrincipalContext, DateTime, MatchType)

Returns a collection of authentication principal objects that have an account expiration time recorded in the specified date and time range.

FindByExpirationTime<T>(PrincipalContext, DateTime, MatchType) FindByExpirationTime<T>(PrincipalContext, DateTime, MatchType) FindByExpirationTime<T>(PrincipalContext, DateTime, MatchType) FindByExpirationTime<T>(PrincipalContext, DateTime, MatchType)

Returns a PrincipalSearchResult<T> collection of objects that have an expiration time within the specified date and time range. This is the template function for extended classes that wish to implement this functionality.

FindByLockoutTime(PrincipalContext, DateTime, MatchType) FindByLockoutTime(PrincipalContext, DateTime, MatchType) FindByLockoutTime(PrincipalContext, DateTime, MatchType) FindByLockoutTime(PrincipalContext, DateTime, MatchType)

Returns a collection of authentication principal objects that have an account lockout time recorded in the specified date and time range.

FindByLockoutTime<T>(PrincipalContext, DateTime, MatchType) FindByLockoutTime<T>(PrincipalContext, DateTime, MatchType) FindByLockoutTime<T>(PrincipalContext, DateTime, MatchType) FindByLockoutTime<T>(PrincipalContext, DateTime, MatchType)

Returns a PrincipalSearchResult<T> collection of objects that have a lockout time within the specified date and time range. This is the template function for extended classes that wish to implement this functionality.

FindByLogonTime(PrincipalContext, DateTime, MatchType) FindByLogonTime(PrincipalContext, DateTime, MatchType) FindByLogonTime(PrincipalContext, DateTime, MatchType) FindByLogonTime(PrincipalContext, DateTime, MatchType)

Returns a collection of authentication principal objects that have an account logon recorded in the specified date and time range.

FindByLogonTime<T>(PrincipalContext, DateTime, MatchType) FindByLogonTime<T>(PrincipalContext, DateTime, MatchType) FindByLogonTime<T>(PrincipalContext, DateTime, MatchType) FindByLogonTime<T>(PrincipalContext, DateTime, MatchType)

Returns a PrincipalSearchResult<T> collection of objects that have a logon time within the specified date and time range. This is the template function for extended classes that wish to implement this functionality.

FindByPasswordSetTime(PrincipalContext, DateTime, MatchType) FindByPasswordSetTime(PrincipalContext, DateTime, MatchType) FindByPasswordSetTime(PrincipalContext, DateTime, MatchType) FindByPasswordSetTime(PrincipalContext, DateTime, MatchType)

Returns a collection of authentication principal objects that have an account password set recorded in the specified date and time range.

FindByPasswordSetTime<T>(PrincipalContext, DateTime, MatchType) FindByPasswordSetTime<T>(PrincipalContext, DateTime, MatchType) FindByPasswordSetTime<T>(PrincipalContext, DateTime, MatchType) FindByPasswordSetTime<T>(PrincipalContext, DateTime, MatchType)

Returns a PrincipalSearchResult<T> collection of objects that have a password set time within the specified date and time range. This is the template function for extended classes that wish to implement this functionality.

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)
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)
IsAccountLockedOut() IsAccountLockedOut() IsAccountLockedOut() IsAccountLockedOut()

Returns a Boolean value that specifies whether the account is currently locked out.

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)
RefreshExpiredPassword() RefreshExpiredPassword() RefreshExpiredPassword() RefreshExpiredPassword()

Refreshes an expired password.

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)
SetPassword(String) SetPassword(String) SetPassword(String) SetPassword(String)

Sets the account password to the specified value.

ToString() ToString() ToString() ToString()

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

(Inherited from Principal)
UnlockAccount() UnlockAccount() UnlockAccount() UnlockAccount()

Unlocks the account if it is currently locked out.

Applies to