> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/cortex-commands-guide/user-commands.md).

# User Commands

* [getSystemUsers](#getsystemusers)
* [getUserGroups](#getusergroups)

#### getSystemUsers

***

Retrieves the list of current users in the environment.

<details>

<summary>Arguments</summary>

| Argument Name | Description                                                                                                                                                                 | Required |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| emails        | A comma-separated list of user email addresses to filter the response by. Only users whose email matches an entry in the list are returned.                                 | Optional |
| names         | A comma-separated list of user names (full or partial) to filter the response by. Each entry is matched case-insensitively against the user's first and last name combined. | Optional |
| limit         | Maximum number of users to return. Default value is 50. Default is 50.                                                                                                      | Optional |

</details>

<details>

<summary>Outputs</summary>

**Core.User.user\_email** *string*

Email address of the user.

**Core.User.user\_first\_name** *string*

First name of the user.

**Core.User.user\_last\_name** *string*

Last name of the user.

**Core.User.role\_name** *string*

Role name associated with the user.

**Core.User.last\_logged\_in** *number*

Timestamp of when the user last logged in.

**Core.User.user\_type** *string*

Type of user.

**Core.User.groups** *string*

Name of user groups associated with the user, if applicable.

**Core.User.scope** *unknown*

Name of scope associated with the user, if applicable.

</details>

#### getUserGroups

***

Retrieves the list of current user emails associated with one or more user groups in the environment. Use this to see who has the permissions granted to a given group.

<details>

<summary>Arguments</summary>

| Argument Name | Description                                                                                        | Required |
| ------------- | -------------------------------------------------------------------------------------------------- | -------- |
| group\_names  | A comma-separated list of one or more user group names for which to retrieve the associated users. | Required |

</details>

<details>

<summary>Outputs</summary>

**Core.UserGroup.group\_name** *string*

Name of the user group.

**Core.UserGroup.description** *string*

Description of the user group, if available.

**Core.UserGroup.pretty\_name** *string*

Name of the user group as it appears in the management console.

**Core.UserGroup.insert\_time** *number*

Timestamp of when the user group was created.

**Core.UserGroup.update\_time** *number*

Timestamp of when the user group was last updated.

**Core.UserGroup.user\_email** *string*

List of email addresses belonging to the users associated with the user group.

**Core.UserGroup.source** *string*

Type of user group.

</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 dynamically by asking a question.

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

```
GET https://cortex-docs.paloaltonetworks.com/cortex-commands-guide/user-commands.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
