> For the complete documentation index, see [llms.txt](https://wiki.datadike.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.datadike.com/pam/administration/accounts/account-templates.md).

# Account templates

Reusable account definitions, so the same credential can serve many assets without being registered one by one.

## What this is and when to use it

A template is a **reusable account definition**. Register the credential once, link it to as many assets as need it, and maintain it in one place instead of in each asset.

The case that makes it obvious: three Active Directory instances that share the same *Domain Admin* login. Registering that login three times means three places to update and three chances to forget one. As a template, it is registered once and linked to all three at the moment each asset is created.

{% hint style="warning" %}
A template is not a copy of a password — it is the **source** of one. Read the [synchronization](#synchronization) section before editing a template that is already in use, because the change does not necessarily reach the assets on its own.
{% endhint %}

## Before you start

* An administrator profile. The screen is restricted to administrators.
* **MFA enabled** on your own account if you intend to reveal a secret or export accounts — both actions require it.

## Steps — creating a template

1. Open **Accounts › Templates** and click **Create**.
2. **Name** — how you will recognize the credential. Required.
3. **Username** — the user name used to authenticate on the assets.
4. **Privileged** — tick it when the account holds administrative privilege on the target, such as `root` or `administrator`.
5. **Secret type** — Password, SSH Key, Token, Access Key, or API Key.
6. **Secret strategy** — whether the secret is specified by you or generated randomly.
7. Save.

## What you should see

![The Templates screen](https://1085357737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7xzJyi9JVzRwnV6JzUho%2Fuploads%2Fgit-blob-8bfc62b64d5bddb5b8e3bcd2e1afde02a8fa267b%2Faccount-templates.png?alt=media)

**1** How many templates exist. **2** Create, which registers a template by hand.

The template appears in the list. The **Auto push** column tells you whether edits will be propagated to the linked assets automatically — this is the column that decides whether you need to synchronize by hand.

## Synchronization

When **Auto push** is not enabled for a template, editing it changes the template and nothing else. The linked assets keep the previous credential until you synchronize.

1. Open **Accounts › Templates** and click the template's name.
2. Go to the **Accounts** tab. The table lists every asset the template is linked to. **View** in the Actions column reveals the current password for that asset — this requires MFA.
3. Click **Sync**. A window opens with the task log, showing success or failure per asset. The task is finished when it reports `succeeded`.

Read the log per asset. A task can finish while individual assets failed, and those assets keep the old credential.

## How to verify it worked

1. Open the template's **Accounts** tab and confirm every intended asset is listed.
2. After a synchronization, open one of the assets and confirm the credential there matches the template.
3. Open a session to that asset using the account. A successful login is the only proof that the target and the vault agree.

## Common errors

| Symptom                                                      | Cause                                                                      | Fix                                                                                         |
| ------------------------------------------------------------ | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| Edited the template and nothing changed on the assets        | **Auto push** is off                                                       | Run **Sync** from the template's **Accounts** tab                                           |
| Sync reported success but one asset still fails              | That asset failed inside the run                                           | Read the task log per asset, not just the final status                                      |
| **View** does not reveal the secret                          | MFA is not enabled on your account                                         | Enable MFA, then retry                                                                      |
| Export is greyed out                                         | No account is selected, or MFA is not enabled                              | Select at least one account and enable MFA                                                  |
| Import rejected                                              | The file is not in the expected CSV or XLSX layout                         | Export first and use that file as the model                                                 |
| A rotated domain credential works everywhere except one host | Rotation does not update the template, and that host was linked afterwards | See [Rotate credentials](https://wiki.datadike.com/pam/administration/accounts/rotation.md) |

## Toolbar

| Control | What it does                                                                        |
| ------- | ----------------------------------------------------------------------------------- |
| Create  | Registers a template by hand                                                        |
| Tags    | Filters templates by tag                                                            |
| Upload  | Imports accounts from CSV or XLSX, creating or updating in bulk                     |
| Export  | Exports the visible accounts to CSV. Requires MFA and at least one selected account |
| Refresh | Reloads the table                                                                   |
| Gear    | Chooses which columns the table shows                                               |

## Field reference

| Column                         | What it means                                                    |
| ------------------------------ | ---------------------------------------------------------------- |
| Name                           | The template's identifying name                                  |
| Username                       | The user name used to log in                                     |
| Secret type                    | Password, SSH key, token, access key, or API key                 |
| Privileged                     | Whether the account is privileged on the asset it is attached to |
| ID                             | Unique identifier                                                |
| Tags                           | Labels attached to the template                                  |
| Secret strategy                | Whether the secret is random or specified                        |
| Platforms                      | The platform attached to the template                            |
| Switch from                    | Login redirection, when there is one                             |
| Organization / Organization ID | The tenant the template belongs to                               |
| Active                         | Whether the template may be used to log in to assets             |
| Auto push                      | Whether editing the template propagates the change automatically |
| Date created / Date updated    | Creation and last change                                         |
| Created by                     | Who created or imported it                                       |
| Description                    | Free text                                                        |

## Related pages

* [Managed accounts](https://wiki.datadike.com/pam/administration/accounts/managed-accounts.md)
* [Rotate credentials](https://wiki.datadike.com/pam/administration/accounts/rotation.md) — and why rotation never updates the template
* [Multi-factor authentication](https://wiki.datadike.com/pam/administration/identities/mfa.md) — required to reveal and export secrets
