> For the complete documentation index, see [llms.txt](https://docs.keeper.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keeper.io/keeperpam/commander-sdk/keeper-commander-sdks/sdk-command-reference/reporting-commands/user-report-command.md).

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

**Function** :

{% code expandable="true" %}

```c#
var enterpriseLoader = new EnterpriseLoader(vault.Auth, new EnterpriseDataPlugin[] { enterpriseData, roleData });
await enterpriseLoader.Load();

void RefreshUserTeams()

Task<ISet<string>> LoadLastLogins(this IAuthentication auth, EnterpriseData enterpriseData, int days = 365)

bool TryGetNode(long nodeId, out EnterpriseNode node)

string[] GetRolesForUser(long userId)   // returns role IDs as strings/long, check actual signature

bool TryGetRole(long roleId, out EnterpriseRole role)
```

{% endcode %}

</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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.keeper.io/keeperpam/commander-sdk/keeper-commander-sdks/sdk-command-reference/reporting-commands/user-report-command.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
