> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IXtfUserClient::SigninUser

> IXtfUserClient::SigninUser

# IXtfUserClient::SigninUser

Signs in a user, specified by email address, and adds the user to the console if necessary.

<Info>In this release, the password text is not encrypted when it is passed over the network to the console by this method. If this behavior is a concern in your network environment, use the [AddUser](/reference/tools/xtf/xtfuser/classes/IXtfUserClient/methods/adduser-ixtfuserclient-xtfuser-xbox-windows-m) method to add the user to the console and 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.) You can subsequently use this method to sign in without passing a password.</Info>

<a id="syntaxSection" />

## Syntax

```cpp theme={null}
public:
HRESULT SigninUser(
         LPCWSTR emailAddress,
         LPCWSTR password,
         BOOL bStorePassword,
         UINT32 *pUserId
)  
```

<a id="ID4E1" />

<a id="parametersSection" />

### Parameters

*emailAddress*\
Type: LPCWSTR

The email address of the user.

*password*\
Type: LPCWSTR

The password to be used for signing in. If a password has been stored on the console for this user, pass `nullptr` to sign in with the stored password.

*bStorePassword*\
Type: BOOL

If TRUE, saves the specified password on the console for later use.

*pUserId*\
Type: UINT32 \*

On successful sign in, points to the user ID of the user.

<a id="ID4EDB" />

<a id="retvalSection" />

### Return value

Type: HRESULT

HRESULT success or error code.

<a id="remarks" />

<a id="remarksSection" />

## Remarks

If the user is already signed in, calling this method has no effect.

This method can return the following error codes.

| Error code | Meaning                                                                                                                        |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------ |
| 0x80048823 | The email address is not valid.                                                                                                |
| 0x8004882E | The password for the specified user is not stored on the console. You must supply a password as part of the sign-in operation. |
| 0x80048821 | The password specified for the user is invalid.                                                                                |
| 0x8015DC16 | The user is signed in on another console.                                                                                      |

To sign in a user by specifying a user ID, use [SigninUserId](/reference/tools/xtf/xtfuser/classes/IXtfUserClient/methods/signinuserid-ixtfuserclient-xtfuser-xbox-windows-m).

To sign out a user, use [SignoutUser](/reference/tools/xtf/xtfuser/classes/IXtfUserClient/methods/signoutuser-ixtfuserclient-xtfuser-xbox-windows-m) or [SignoutUserId](/reference/tools/xtf/xtfuser/classes/IXtfUserClient/methods/signoutuserid-ixtfuserclient-xtfuser-xbox-windows-m).

<a id="requirementsSection" />

## Requirements

**Header:** xtfuser.h

**Library:** xtfuser.lib

**Supported platforms:** Windows (for XBOX console tools)

<a id="seealsoSection" />

## See also

[IXtfUserClient interface](/reference/tools/xtf/xtfuser/classes/IXtfUserClient/ixtfuserclient-xtfuser-xbox-windows-t)


## Related topics

- [IXtfUserClient::SigninUserId](/reference/tools/xtf/xtfuser/classes/IXtfUserClient/methods/signinuserid-ixtfuserclient-xtfuser-xbox-windows-m.md)
- [IXtfUserClient::SignoutUserId](/reference/tools/xtf/xtfuser/classes/IXtfUserClient/methods/signoutuserid-ixtfuserclient-xtfuser-xbox-windows-m.md)
- [IXtfUserClient::SignoutUser](/reference/tools/xtf/xtfuser/classes/IXtfUserClient/methods/signoutuser-ixtfuserclient-xtfuser-xbox-windows-m.md)
- [IXtfUserClient::AddUser Method](/reference/tools/xtf/xtfuser/classes/IXtfUserClient/methods/adduser-ixtfuserclient-xtfuser-xbox-windows-m.md)
- [IXtfUserClient::DeleteUser](/reference/tools/xtf/xtfuser/classes/IXtfUserClient/methods/deleteuser-ixtfuserclient-xtfuser-xbox-windows-m.md)
