Partager via


IMAPasswordManagement.ChangePassword Method

Changes the password on the CSEntry object. This method is called when the call to the BeginConnectionToServer method is successful.

Namespace: Microsoft.MetadirectoryServices
Assembly: Microsoft.MetadirectoryServicesEx (in Microsoft.MetadirectoryServicesEx.dll)

Usage

'Usage
Dim instance As IMAPasswordManagement
Dim csentry As CSEntry
Dim OldPassword As String
Dim NewPassword As String

instance.ChangePassword(csentry, OldPassword, NewPassword)

Syntax

'Declaration
Sub ChangePassword ( _
    csentry As CSEntry, _
    OldPassword As String, _
    NewPassword As String _
)
void ChangePassword (
    CSEntry csentry,
    string OldPassword,
    string NewPassword
)
void ChangePassword (
    CSEntry^ csentry, 
    String^ OldPassword, 
    String^ NewPassword
)
void ChangePassword (
    CSEntry csentry, 
    String OldPassword, 
    String NewPassword
)
function ChangePassword (
    csentry : CSEntry, 
    OldPassword : String, 
    NewPassword : String
)

Parameters

  • csentry
    The CSEntry object that specifies the user.
  • OldPassword
    The old password.
  • NewPassword
    The new password.

Exceptions

Exception type Condition
AccessDeniedException

The password extension failed to set the password in the connected directory.

ObjectTypeNotSupportedException

The object type does not support setting or changing passwords.

EntryPointNotImplementedException

The password extension does not implement this method.

PasswordExtensionException

The password extension throws an unknown exception.

PasswordIllFormedException

The supplied password contains extended characters or invalid characters.

PasswordPolicyViolationException

The password does not comply with the password policy.

ServerDownException

The connected directory extension cannot establish a connection to the connected directory.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Target Platforms

See Also

Reference

IMAPasswordManagement Interface
IMAPasswordManagement Members
Microsoft.MetadirectoryServices Namespace
IMAPasswordManagement Interface