# ユーザー移管コマンド

### **ユーザー移行コマンド**

ユーザーアカウントとボルトを別のユーザーへ譲渡します。

<details>

<summary>Dotnet CLI</summary>

**コマンド:** `transfer-user`

**使用法:**

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

**オプション:**

* `-f, --force` - エンタープライズデータを強制的に再読み込みする

**注意:** ソースユーザーからターゲットユーザーへ、ボルト内のすべてのデータが譲渡されます。譲渡後、ソースユーザーはロックされます。

**例:**

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

</details>

<details>

<summary>DotNet SDK</summary>

**メソッド:** `TransferUserAccount`

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

**例:**

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

</details>

<details>

<summary>PowerCommander</summary>

**コマンド:** `Move-KeeperEnterpriseUser`

**使用法:**

{% code overflow="wrap" %}

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

{% endcode %}

**例:**

* `FromUser`：ボルトを譲渡するソースユーザーのメールアドレスまたはエンタープライズユーザーID
* `TargetUser`：ボルトを受け取る譲渡先ユーザーのメールアドレスまたはエンタープライズユーザーID
* `Force`：非対話セッションでは確認プロンプトを表示しない、と文書化されています

**パラメーター:**

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

</details>

<details>

<summary>Python CLI</summary>

**コマンド:** `transfer-user`

**パラメーター:**

`email` - ユーザーアカウントのメールアドレスまたはID（文字列のリスト）、またはアカウント対応表を含むファイルを指定します。対応表ファイルを使う場合は `@filename` と指定します（必須）

**オプション:**

* `-f`, `--force` - 確認を求めない
* `--target-user` - ユーザーを譲渡する先のメールアドレス

**ファイル入力の例**

```
# 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
```

**警告:** この操作は取り消せません。譲渡処理中は、ソースユーザーアカウントがロックされます。

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

</details>

<details>

<summary>Python SDK</summary>

**関数:** `transfer_account`

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

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.keeper.io/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/enterprise-management-commands/transfer-user-commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
