**Source URL:** https://general.veevavault.dev/commercial/vql/query-targets/users.md

# Users



The `users` query target allows you to query the users in your Vault.

To retrieve user fields and field properties, use the [Retrieve User Metadata API](/vault-api/api-reference/26.1/users/retrieve-user-metadata).

When querying users across Vaults, Vault uses the private key values (`external`, `readOnly`, and `full`) for the `license_type__v` field.

## User Query Examples {#User_Query_Examples}

The following are examples of user queries.

### Query: Retrieve Users With a Specific License Type {#Query_Retrieve_Users_With_a_Specific_License_Type}

The following query uses the `external` private key value instead of `external__v` to retrieve the first and last names of all external users:

```
SELECT user_first_name__v, user_last_name__v, license_type__v
FROM users
WHERE license_type__v = 'external'

```

#### Response: Retrieve Users With a Specific License Type {#Response_Retrieve_Users_With_a_Specific_License_Type}

The response returns `external__v` instead of the private key value `external`:

```
{
    "responseStatus": "SUCCESS",
    "responseDetails": {
        "pagesize": 1000,
        "pageoffset": 0,
        "size": 1,
        "total": 1
    },
    "data": [
        {
            "user_first_name__v": "Abigail",
            "user_last_name__v": "Smith",
            "license_type__v": "external__v"
        }
    ]
}

```


---

**Previous:** [Renditions](/commercial/vql/query-targets/renditions)  
**Next:** [Vault Component Definitions](/commercial/vql/query-targets/vault-component-definitions)