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

# &#x20;Application Tags&#x20;

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

## Application Tags Object

### Methods

* ### `list()`

  Returns an array of [ElementTag objects](/process-functions/security-application-elementtag) and [ScreenTag objects](/process-functions/security-application-screentag) in the application.

* ### `list(includeAccessEntries)`
  * `includeAccessEntries` (boolean): If `true`, includes access entries in the returned objects.

* ### `exists(tagNameOrId)`

  Returns `true` if a tag exists in the application, otherwise `false`.

  * `tagNameOrId` (string): The tag name or id.

* ### `get(tagNameOrId)`

  Returns an [ElementTag object](/process-functions/security-application-elementtag), [ScreenTag object](/process-functions/security-application-screentag), or `null` from the application.

  * `tagNameOrId` (string): The tag name or id.

* ### `remove(tagNameOrId)`

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

  * `tagNameOrId` (string): The tag name or id.

* ### `removeAll()`

  Removes all tags from the application.

* ### `createElement(name, dimensionId, hierarchyId)`

  Creates and returns an [ElementTag object](/process-functions/security-application-elementtag) in the application.

  * `name` (string): The tag name.
  * `dimensionId` (string): The dimension id.
  * `hierarchyId` (string): The hierarchy id.

* ### `createScreen(name)`

  Creates and returns a [ScreenTag object](/process-functions/security-application-screentag) in the application.

  * `name` (string): The tag name.

### User Helpers

These methods are also available on the `tags` object so user tag operations can be performed from the application context.

* ### `userRemoveAll(userIdOrUser)`

  Removes all tags from a user in the application.

  * `userIdOrUser` (string | object): The user id or [User object](/process-functions/userSecurity-user).

* ### `userSetTags(userIdOrUser, tags)`

  Replaces the user's application tags.

  * `userIdOrUser` (string | object): The user id or [User object](/process-functions/userSecurity-user).
  * `tags` (array): An array of tag names, ids, or tag objects.

* ### `userGetTags(userIdOrUser)`

  Returns an array of all ElementTag and ScreenTag objects assigned to a user in the application.

  * `userIdOrUser` (string | object): The user id or [User object](/process-functions/userSecurity-user).

* ### `userGetElements(userIdOrUser, dimension, hierarchy)`

  Returns the accessible elements for a user in a hierarchy.

  * `userIdOrUser` (string | object): The user id or [User object](/process-functions/userSecurity-user).
  * `dimension` (string): The dimension name or id.
  * `hierarchy` (string): The hierarchy name or id.

* ### `userGetScreenTags(userIdOrUser)`

  Returns an array of all ScreenTag objects assigned to a user in the application.

  * `userIdOrUser` (string | object): The user id or [User object](/process-functions/userSecurity-user).

* ### `userGetElementTags(userIdOrUser)`

  Returns an array of all ElementTag objects assigned to a user in the application.

  * `userIdOrUser` (string | object): The user id or [User object](/process-functions/userSecurity-user).

### Examples

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

var regionTag = tags.createElement("Region Access", "Account", "Default");
var screenTag = tags.createScreen("Planner Screens");

console.log(tags.exists("Region Access"));
console.log(tags.list());

tags.userSetTags("user@example.com", [regionTag, screenTag]);
```
