> ## 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::DeleteUserId

> IXtfUserClient::DeleteUserId

# IXtfUserClient::DeleteUserId

Removes a user, specified by user ID, from the console.

<a id="syntaxSection" />

## Syntax

```cpp theme={null}
public:
HRESULT DeleteUserId(
         UINT32 userId
)  
```

<a id="parametersSection" />

### Parameters

*userId*\
Type: UINT32

The user ID of the user to remove.

<a id="retvalSection" />

### Return value

Type: HRESULT

HRESULT success or error code.

<a id="remarksSection" />

## Remarks

If a user is signed in to the console, the user is signed out before being removed.

To delete a user by specifying an email address, use [DeleteUser](/reference/tools/xtf/xtfuser/classes/IXtfUserClient/methods/deleteuser-ixtfuserclient-xtfuser-xbox-windows-m).

To delete all users, use [DeleteAllUsers](/reference/tools/xtf/xtfuser/classes/IXtfUserClient/methods/deleteallusers-ixtfuserclient-xtfuser-xbox-windows-m).

To add a user, use [AddUser](/reference/tools/xtf/xtfuser/classes/IXtfUserClient/methods/adduser-ixtfuserclient-xtfuser-xbox-windows-m).

<a id="requirementsSection" />

## Requirements

**Header:** xtfuser.h

**Library:** xtfuser.lib

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

## See also

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


## Related topics

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