# ユーザーレポートコマンド

### ユーザーレポート <a href="#user-report" id="user-report"></a>

ユーザーの状態をまとめたレポートを表示します。

<details>

<summary>DotNet CLI</summary>

**近日公開**

</details>

<details>

<summary>DotNet SDK</summary>

**近日公開**

</details>

<details>

<summary>PowerCommander</summary>

**コマンド:** `Get-KeeperUserReport`

**別名:** `user-report`

メールアドレス、名前、ステータス、転送ステータス、最終ログイン、ノード、ロール、チームなどを含むユーザー状態レポートを返します。

**パラメーター:**

`-Days` - 指定した日数の範囲でレポートを生成します。

`-LastLogin` - 最終ログインに関する列のみを表示します (列: `email`、`name`、`status`、`transfer_status`、`last_login`)。

`-Format` - レポートをjson、table、csvの形式で表示します。

`-Output` - 出力をファイルに保存します。

**例:**

```powershell
PS > Get-KeeperUserReport -Days 30 -LastLogin
Email                             Name                  Status  TransferStatus    LastLogin
-----                             ----                  ------  --------------    ---------
abc@gmail.com                                           Invited Pending transfer  N/A
abc234@example.com                                      Invited Pending transfer  N/A
abcwfef@gmail.com                 SEA                   Invited Pending transfer  N/A
test1@example.com              test user                Active  Transfer accepted 2026-03-24 11:11:32 UTC
```

</details>

<details>

<summary>Python CLI</summary>

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

**フラグ:**

* `--format` 出力形式 {table, csv, json}
* `--output` 結果ファイルの出力パス (形式が `table` のときは無視)
* `--days` 最終ログインを遡る日数 (0は制限なし)。既定は365
* `--last-login, -l` 最終ログイン情報に絞った簡易レポート

**例:**

```
My Vault> user-report --days 20 --last-login --format json --output json
```

</details>

<details>

<summary>Python SDK</summary>

**関数:**

```python
def generate_report(self) -> List[UserReportEntry]:
        """Generate the user report."""
        users = list(self._enterprise_data.users.get_all_entities())
        active_usernames = [u.username.lower() for u in users if u.status == 'active']
```

</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/reporting-commands/user-report-command.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.
