IMAPasswordManagement.SetPassword Method
Sets the password for 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 NewPassword As String
instance.SetPassword(csentry, NewPassword)
Syntax
'Declaration
Sub SetPassword ( _
csentry As CSEntry, _
NewPassword As String _
)
void SetPassword (
CSEntry csentry,
string NewPassword
)
void SetPassword (
CSEntry^ csentry,
String^ NewPassword
)
void SetPassword (
CSEntry csentry,
String NewPassword
)
function SetPassword (
csentry : CSEntry,
NewPassword : String
)
Parameters
- csentry
The CSEntry object with the password to be set.
- NewPassword
The new password. Use the value of this parameter to set 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 rules 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. |
Remarks
Use the value of the NewPassword parameter as the new password instead of the export_password attribute of the CSEntry object. The export_password attribute might not have a value.
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
CSEntry Class
IMAPasswordManagement Interface