Microsoft Identity Integration Server 2003 Developer Reference

SetPassword Method of the MIIS_CSObject Class

The SetPassword method sets the password on a connector space object to a new password. This method requires that password synchronization be enabled for the management agent. To use this method, you must be logged on as a member of the MIISPasswordSet security group.
string SetPassword(
  string NewPassword
);

Parameters

NewPassword
[in] Contains the new password.

Return Values

Returns a string that contains the results of the method. The return value can be one of the following values.
Return code Description
success The call was successful and the password was changed to the NewPassword parameter.
access-denied The account that is calling this method is not a member of the appropriate group that can change passwords in the connected data source. Verify that the account running this method can change passwords in the connected data source.
ma-access-denied The account with the management agent does not have the right to set the password. Verify that the account running the management agent can change passwords in the connected data source.
ma-concurrent-execution The management agent cannot set the password because either another management agent of the same type is currently executing or a Set Password call is being made on a management agent of the same type. In Microsoft Identity Integration Server 2003, this error is returned by Lotus Notes management agents.
ma-credentials-failure The management agent was unable to log on to the connected directory using the stored credentials. Verify that the management agent credentials are correct. For more information about configuring Active Directory management agent credentials, see "Connect to an Active Directory Forest" in the Microsoft Identity Integration Server 2003 Help. For more information about configuring the credentials for the management agent for Sun ONE Directory Server 5.1 (formerly iPlanet Directory Server) and Netscape Directory Server 6.1, see "Specify logon information" in the Microsoft Identity Integration Server 2003 Help.
ma-encryption-not-enabled The management agent did not set the password because 128-bit encryption has not been configured on the connection used by the management agent to communicate with the connected directory. Enable this encryption on your network.
ma-feature-not-supported The management agent does not support password changes.
ma-object-type-not-supported The management agent does not support password changes on this object type.
new-password-ill-formed The specified NewPassword parameter cannot be used as a password because the parameter contains characters that cannot be entered from a keyboard. Verify that the NewPassword parameter contains only characters that can be entered from a keyboard.
new-password-violate-policy The specified NewPassword parameter does not comply with the password policy set by the administrator. Verify that the NewPassword parameter complies with the password policy set by the administrator.
object-newly-provisioned The object has been provisioned as a new object but the object has not been created in the connected directory. You cannot perform password operations until the object has been exported to the connected directory.
object-not-found The object has been deleted from the server.
password-sync-disabled The password synchronization setting for the specified management agent is not enabled. Enable password synchronization for the specified management agent.
partition-not-configured The specified object is in a partition that has not yet been configured. Configure the partition with Identity Manager. For more information about configuring an Active Directory partition, see "Configure directory partitions" in the Microsoft Identity Integration Server 2003 Help.
server-down The Microsoft Identity Integration Server 2003 server could not connect to the server containing the partition for the object. Verify that the server containing the partition is running and connected to the network.
time-difference-at-dc The new password cannot be set because the time indicated on the Microsoft Identity Integration server is greater than five minutes from the time indicated on the Active Directory server. By default, the time difference between servers must be less than or equal to five minutes. Synchronize the times between the servers.

Remarks

This method works only with the following management agents:

For the management agent for Active Directory and the management agent for Active Directory global address list (GAL), the preferred domain controller is used to locate the server with the partition that contains the connector space object.

When you call the SetPassword method, an entry is written to the event log. The entry contains information about who made the request, the target of the request, and the status of the request.

Example Code

The following example shows you how to use Visual Basic Scripting Edition (VBScript) to set the password of the account Jeff in the main domain to NewPassword.

Requirements

Server: Requires Microsoft Identity Integration Server 2003.
Header: Declared in mmswmi.mof.