# User Report Command

### User Report

This command/function helps to display user status report.

<details>

<summary>DotNet CLI</summary>

Coming soon

</details>

<details>

<summary>DotNet SDK</summary>

Coming Soon

</details>

<details>

<summary>PowerCommander</summary>

**Command:** `Get-KeeperUserReport`

**Alias:** `user-report`

It returns user status report including email, name, status, transfer status, last login, node, roles, and teams.

**Parameter:**

`-Days` - Generate report for last number of days.

`-LastLogin` - Show only last-login columns (email, name, status, transfer\_status, last\_login).

`-Format` - Display the report in these formats json, table, csv

`-Output` - Store the output in a file.

**Examples:**

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

**Command:** `user-report`

**Flag:**

* `--format` format of output {table, csv, json}.
* `--output` output path to resulting output file (ignored for "table" format)
* `--days` days to look back for last login (0 = no limit). Default: 365
* `--last-login, -l` Simplify report to show only last-login info

**Example:**

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

</details>

<details>

<summary>Python SDK</summary>

**Function:**

```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/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.
