Signs the user with given User ID into Xbox Live, adding them to the console if necessary.
Important
In this release, the password text is not encrypted when it is passed over the network to the console by SigninUserId. If this is a concern in your network environment, then use IXtfUserClient::AddUser Method to add the user to the console, then use the Sign-In app on the console to sign in the user and store the user password. (The Sign-In app sends the password over the network encrypted.) After this, you can subsequently use SigninUserId to sign in without passing a password.
public:
HRESULT SigninUserId(
UINT32 userId,
LPCWSTR password,
BOOL bStorePassword
)
userId
Type: UINT32
The User ID of the user.
password
Type: LPCWSTR
[optional] The password to be used for signing in. If a password has been stored on the console for this user, your code can pass nullptr to sign in with the stored password.
bStorePassword
Type: BOOL
If TRUE, saves the given password on the console for later use.
Type: HRESULT
HRESULT success or error code.
If the user is already signed in, calling SigninUserId has no effect.
The following error codes may be returned by SigninUserId.
| Error code | Meaning | 0x80048823 | The email address is not a valid email address. | |
|---|---|---|---|---|
| 0x8004882E | The password for the given user is not stored on the console. You must supply a password as part of the sign in operation. | |||
| 0x80048821 | The password for the given user is invalid, | |||
| 0x8015DC16 | The given user is signed in on another console. |
Header: Declared in xtfuser.h.
Library: Use xtfuser.lib.