# Transfer User Commands

**Usage**

Transfer user account and vault to another user

<details>

<summary>Dotnet CLI</summary>

**Command:** `transfer-user`

**Usage:**

```bash
transfer-user [options] <from-user> <target-user>
```

**Options:**

* `-f, --force` - Force reload enterprise data

**Note:** This transfers all vault data from the source user to the target user. The source user will be locked after transfer.

**Example:**

```
transfer-user olduser@example.com newuser@example.com
transfer-user UserID123 UserID456
```

</details>

<details>

<summary>DotNet SDK</summary>

**Function:** `TransferUserAccount`

```csharp
 public async Task<AccountTransferResult> TransferUserAccount(IRoleData roleData, EnterpriseUser fromUser,
            EnterpriseUser targetUser)
```

**Example:**

```csharp
var result = await context.EnterpriseData.TransferUserAccount(context.RoleManagement, fromUser, targetUser);
```

</details>

<details>

<summary>PowerCommander</summary>

**Command:** `Move-KeeperEnterpriseUser`

**Usage:**

{% code overflow="wrap" %}

```
Move-KeeperEnterpriseUser -FromUser "departing@company.com" -TargetUser "replacement@company.com"
transfer-user "departing@company.com" "replacement@company.com" -Force
```

{% endcode %}

**Examples:**

* `FromUser`: "Email or enterprise user ID of the source user whose vault will be transferred"
* `TargetUser`: "Email or enterprise user ID of the destination user who will receive the vault"
* `Force`: Documented as "Skip confirmation prompt in non-interactive sessions"

**Parameters:**

```powershell
Move-KeeperEnterpriseUser [-Email] <string> [-NodeId] <long> [<CommonParameters>]
```

</details>

<details>

<summary>Python CLI</summary>

**Command:** `transfer-user`

**Parameters**:

`email` - User account email/ID (list of strings) or File containing account mappings. Use @filename to indicate using mapping file. (required)

**Options**:

* `-f`, `--force` - Do not prompt for confirmation
* `--target-user` - Email to transfer user(s) to

**File Input Examples**

```
# Lines starting with #, ;, or - are comments
john.doe@company.com -> admin@company.com
jane.smith@company.com <- admin@company.com  
old.user@company.com = new.admin@company.com
user1@company.com user2@company.com
```

**Warning:** This action cannot be undone. The source user accounts will be locked during the transfer process.

<pre><code><strong>My Vault> transfer-user keeperuser1@keepersecurity.com --target-user recipient@keepersecurity.com
</strong></code></pre>

</details>

<details>

<summary>Python SDK</summary>

**Function:** `transfer_account`

```
account_transfer.AccountTransferManager()
transfer_manager.transfer_account(
                        source_user, ##from user
                        target_user, ##to user
                        target_keys[target_user]
                    )
```

</details>
