IMessenger::AutoSignin method

[AutoSignin is no longer available for use as of Windows Vista. See Windows Messenger for more information.]

Signs the local client in automatically using the last sign-in name and saved password information.


HRESULT AutoSignin();


This method has no parameters.

Return value


For a table of MSGR_E_* constants, see MSGRConstants. Returns one of the following values.

Return code Description
Success. See Remarks.
The Sign In dialog box was enabled and visible when this method was called.
Client was already signed in (scripting).
Client was already signed in.
Returned for one of the following reasons:
  • First-time user.
  • No available credentials.
  • Cannot determine local state.
  • Lost connection.
  • Password encoding failed.
  • Unspecified internal error. Cannot access object.


This method always signs the user in to the primary service. This method's behavior depends on the primary service on the client. The Microsoft Exchange Instant Messaging Service (IM) client offers users the option to use Exchange as the primary service. The AutoSignin method will not launch the secondary sign-in dialog box for any configured secondary services on any client. Only the primary service can be signed into using this method. To sign in to all services, use Signin. This method will always display the Sign In dialog box, even with cached credentials.

If saving the password locally is not enabled by a specific user option, this method will fail.

This method is used for initial sign-in if necessary, but requires that the sign-in credentials are previously stored by the client user.

If this method fails, implementers can display the Sign In dialog box by calling Signin with NULL strings for sign-in name and password.

Because sign-in relies on server authentication, several possible error conditions are not checked for by the HResult of AutoSignin; instead, they are returned in the Signin event. These error conditions include, but are not limited to, bad credentials stored from the last sign-in attempt, a blank sign-in name or password, and connection problems, each of which is differentiated by the hr parameter of the event. To determine whether the sign-in sequence succeeded, clients should always check both the HResult of AutoSignin and the hr parameter of the Signin event.


The following remarks apply to scripting languages.

  • This method is scriptable.
  • You should not return MSGR_E_NOT_LOGGED_ON to avoid an exception.
  • Clear the value returned to the user.


End of client support
Windows XP
End of server support
Windows Server 2003