# Action Report Command

### Action Report not logged users

This command/function helps to display a list of not logged users in a specified number of days.

<details>

<summary>DotNet CLI</summary>

**Command:** `action-report --target no-logon --days-since 45`

**Parameter:**

`target` or `t` - User status that you want to report `<no-logon, no-update, locked, invited, no-recovery>` .

`days-since` or `d` - Look back this many days for targeted action `<NUMBER OF DAYS>` .

**Examples:**

```sh
My Vault> action-report --target no-logon --days-since 45
```

</details>

<details>

<summary>DotNet SDK</summary>

**Function:**

{% code expandable="true" %}

```ps1
public static async Task<ActionReportResult> RunActionReport(
            this EnterpriseData enterpriseData,
            IAuthentication auth,
            ActionReportOptions options,
            IRoleData roleData = null)
```

{% endcode %}

</details>

<details>

<summary>PowerCommander</summary>

**Command:** `Get-KeeperActionReport`

**Parameter:**

`-Target` - User status that you want to report `<no-logon, no-update, locked, invited, no-recovery>` .

`-DaysDince` - Look back this many days for targeted action `<NUMBER OF DAYS>` .

**Examples:**

{% code expandable="true" %}

```powershell
PS > Get-KeeperActionReport

Admin Action Taken:
        COMMAND: NONE (No action specified)
        STATUS: n/a
        SERVER MESSAGE: n/a
        AFFECTED: 0

Note: the following reflects data prior to any administrative action being applied
3 User(s) With "No-logon" Status Older Than 30 Day(s):

       User ID Email                         Name               Status Transfer Status   Node
       ------- -----                         ----               ------ ---------------   ----
10411693851111 user1@example.com             User 1             Active Transfer accepted Node1
10411693851112 user2@example.com             User 2             Active Transfer accepted Node1\Node2 
10411693851113 user3@example.com             User 3             Active Transfer accepted Node1\Node3
 

```

{% endcode %}

</details>

<details>

<summary>Python CLI</summary>

**Example:**

```
Admin Action Taken:
        COMMAND: NONE (No action specified)
        STATUS: n/a
        SERVER MESSAGE: n/a
        AFFECTED: 0

Note: the following reflects data prior to any administrative action being applied
8 User(s) With "No-logon" Status Older Than 30 Day(s): 

         User ID  Email                                   Name              Status    Transfer Status    Node
----------------  --------------------------------------  ----------------  --------  -----------------  ---------------------------------------
1169425105420506  user1@example.com                            Active    Transfer accepted  Metronlabs\test1
1169425105420717  user2@example.com                               Active    Transfer accepted  Metronlabs
```

</details>

<details>

<summary>Python SDK</summary>

**Function:**

```python
 def generate_report(self) -> List[ActionReportEntry]:
        target_users = self._get_target_users()
        
        report_entries: List[ActionReportEntry] = []
        
        for user in target_users:
```

</details>

### Action Report Locked users

This command/function helps to Show a list of user accounts that have remained in a locked status for 60+ days within specified node.

<details>

<summary>DotNet CLI</summary>

**Command:** `action-report --target locked --days-since 10 --node="sales"`

**Parameter:**

`target` or `t` - User status that you want to report `<no-logon, no-update, locked, invited, no-recovery>` .

`days-since` or `d` - Look back this many days for targeted action `<NUMBER OF DAYS>` .

`node` - Give the specified name.

`apply-action` or `a` - The action you want to apply `none,lock,delete,transfer` .

**Examples:**

```sh
My Vault> action-report --target locked --days-since 10 --node="sales"
```

</details>

<details>

<summary>DotNet SDK</summary>

**Function:**

{% code expandable="true" %}

```ps1
def generate_report(self) -> List[ActionReportEntry]:
        target_users = self._get_target_users()
        
        report_entries: List[ActionReportEntry] = []
        
        for user in target_users:
```

{% endcode %}

</details>

<details>

<summary>PowerCommander</summary>

**Command:** `Get-KeeperActionReport`

**Parameter:**

`-Target` - User status that you want to report `<no-logon, no-update, locked, invited, no-recovery>` .

`-DaysSince` - Look back this many days for targeted action `<NUMBER OF DAYS>` .

`-Node` - Give the specified name.

`-ApplyAction` - The action you want to apply `none,lock,delete,transfer` .

**Examples:**

```powershell
PS >  Get-KeeperActionReport -Target no-logon -DaysSince 30 -Node "Node1"

Admin Action Taken:
        COMMAND: NONE (No action specified)
        STATUS: n/a
        SERVER MESSAGE: n/a
        AFFECTED: 0

Note: the following reflects data prior to any administrative action being applied
2 User(s) With "No-logon" Status Older Than 30 Day(s) in Node "Node1":

       User ID Email                   Name          Status Transfer Status   Node
       ------- -----                   ----          ------ ---------------   ----
10411693850000 user1@example.com       user1         Active Transfer accepted Node\Node1      
10411693850001 user2@example.com       user2         Active Transfer accepted Node\Node1\Node2
```

</details>

<details>

<summary>Python CLI</summary>

**Example:**

```
Admin Action Taken:
        COMMAND: NONE (No action specified)
        STATUS: n/a
        SERVER MESSAGE: n/a
        AFFECTED: 0

Note: the following reflects data prior to any administrative action being applied
0 User(s) With "Locked" Status Older Than 90 Day(s): 
 
       User ID  Email                      Name    Status    Transfer Status    Node
--------------  -------------------------  ------  --------  -----------------  ---------------
70411693850646  user1@example.com  Sharad  Locked    Transfer accepted  Keeper Security
```

</details>

<details>

<summary>Python SDK</summary>

**Function:**

```python
def generate_aging_report(
def generate_report(self) -> List[ActionReportEntry]:
        target_users = self._get_target_users()
        
        report_entries: List[ActionReportEntry] = []
        
        for user in target_users:
```

</details>

### Action Report with specified columns

This command/function helps to Show a list of users that haven't logged and we can specify the report columns here.

<details>

<summary>DotNet CLI</summary>

**Command:** `action-report -t no-logon --columns= node, name, user_id, email, status, transfer_status`

**Parameter:**

`columns` - We can add these columns into the report `node, name, user_id, email, status, transfer_status` .

**Examples:**

```sh
My Vault> action-report -t no-update  --columns=node,name,user_id,email,status,transfer_status -d 10             
```

</details>

<details>

<summary>DotNet SDK</summary>

**Function:**

{% code expandable="true" %}

```ps1
public static async Task<ActionReportResult> RunActionReport(
            this EnterpriseData enterpriseData,
            IAuthentication auth,
            ActionReportOptions options,
            IRoleData roleData = null)
```

{% endcode %}

</details>

<details>

<summary>PowerCommander</summary>

**Command:** `Get-KeeperActionReport`

**Parameter:**

`-Columns` - We can add these columns into the report `node, name, user_id, email, status, transfer_status` .

**Examples:**

```powershell
PS >  Get-KeeperActionReport -Target no-logon -Columns "name,status,transfer_status,2fa_enabled"

Admin Action Taken:
        COMMAND: NONE (No action specified)
        STATUS: n/a
        SERVER MESSAGE: n/a
        AFFECTED: 0

Note: the following reflects data prior to any administrative action being applied
3 User(s) With "No-logon" Status Older Than 30 Day(s):

Email                         Name               Status Transfer Status   2FA Enabled
-----                         ----               ------ ---------------   -----------
user1@example.com             user1              Active Transfer accepted False
user2+1@example.com           user2              Active Transfer accepted False
user3@example.com             user3              Active Transfer accepted False

```

</details>

<details>

<summary>Python CLI</summary>

**Example:**

```
My Vault> action-report --target no-logon --columns "name, status, transfer_status"

Admin Action Taken:
        COMMAND: NONE (No action specified)
        STATUS: n/a
        SERVER MESSAGE: n/a
        AFFECTED: 0

Note: the following reflects data prior to any administrative action being applied
14 User(s) With "No-logon" Status Older Than 30 Day(s): 

       User ID  Name                 Status    Transfer Status
--------------  -------------------  --------  -----------------
70411693850753  A Test               Active    Transfer accepted
70411693853038  Testing              Active    Not accepted
```

</details>

<details>

<summary>Python SDK</summary>

**Function:**

```python
def generate_report(self) -> List[ActionReportEntry]:
        target_users = self._get_target_users()
        
        report_entries: List[ActionReportEntry] = []
        
        for user in target_users:
```

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