---
url: /process-functions/security-applicationaddtag.md
description: Adds a tag to an application.
---

# security.applicationAddTag&#x20;

Adds a tag to an application.

::: warning Deprecated
Use [`app.tags.createElement(name, dimension, hierarchy)`](/process-functions/security-application-tags#createelement) instead.
:::

```js
security.applicationAddTag(applicationId, tagName, dimensionId, hierarchyId, all)
```

## Parameters

| Parameter | Type | Description |
|---|---|---|
| `applicationId` | `string` | The application id. |
| `tagName` | `string` | The tag name. |
| `dimensionId` | `string` | Id of the dimension. |
| `hierarchyId` | `string` | Id of the hierarchy. |
| `all` | `boolean` | If it should be added to all elements in the hierarchy. |

## Returns

`true` if the tag was created; `false` on any of the error conditions above.

## Examples

```js
const added = security.applicationAddTag("MyActivityId", "Admin", "DimensionId", "HierarchyId", false);
```
