---
url: /process-functions/security-application-users-interface.md
description: Returns the application users object from security.application.
---

# Application Users&#x20;

Returns the application users object from [security.application](/process-functions/security-application).

## Application Users Object

### Methods

* ### `get(userIdOrEmail)`

  Returns a [User object](/process-functions/userSecurity-user) assigned to the application, or `null` if the user is not assigned.

  * `userIdOrEmail` (string): The user id or email address.

* ### `list()`

  Returns an array of [User objects](/process-functions/userSecurity-user) assigned to the application.

* ### `exists(userIdOrUserOrEmail)`

  Returns `true` if a user is assigned to the application, otherwise `false`.

  * `userIdOrUserOrEmail` (number | string | object): The user id, email address, or [User object](/process-functions/userSecurity-user).

* ### `add(userIdOrUserOrEmail)`

  Adds a user to the application and returns `true` if the user was added, otherwise `false`.

  * `userIdOrUserOrEmail` (number | string | object): The user id, email address, or [User object](/process-functions/userSecurity-user).

* ### `remove(userIdOrUserOrEmail)`

  Removes a user from the application and returns `true` if the user was removed, otherwise `false`.

  * `userIdOrUserOrEmail` (number | string | object): The user id, email address, or [User object](/process-functions/userSecurity-user).

* ### `removeAll()`

  Removes all users from the application.

### Returned Object

The `users` object returns the same [User object](/process-functions/userSecurity-user) documented under `userSecurity.users`.

### Examples

```js
var app = security.application("My Application");
var appUsers = app.users;

var currentUser = userSecurity.users.getCurrent();

console.log(`App contains current user: ${appUsers.exists(currentUser)}`);
```
