---
url: /process-functions/security-applicationuserelements.md
description: >-
  Lists all elements on a dimension visible to a user in an application, as a
  JSON-encoded array.
---

# security.applicationUserElements&#x20;

Lists all elements on a dimension visible to a user in an application, as a JSON-encoded array.

::: warning Deprecated
Use [`app.tags.userGetElements(user, dimension, hierarchy)`](/process-functions/security-application-tags#usergetelements) instead.
:::

```js
security.applicationUserElements(applicationId, userId, dimensionName, hierarchyName)
```

## Parameters

| Parameter | Type | Description |
|---|---|---|
| `applicationId` | `string` | The application id. |
| `userId` | `string` | The user id. |
| `dimensionName` | `string` | The name of the dimension. |
| `hierarchyName` | `string` | The name of the hierarchy on the dimension. |

## Returns

A JSON-encoded array of the elements the user can see on the given dimension and hierarchy. `"[]"` when the application is not found.

## Examples

```js
const elements = JSON.parse(security.applicationUserElements("MyActivityId", 123, "Account", "Default")); // ["All Accounts", "Revenue", ...]
```
