> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/pam/pam-with-devolutions-server/custom-pam-provider-template-file-format.md). Agents can also search and read this documentation through its [MCP server](https://docs.devolutions.net/~gitbook/mcp).

# Custom PAM provider template file format

The .json file format of Devolutions Server custom PAM provider templates: fields, property types, parameter sources, actions and import errors.

Devolutions Server exports a custom PAM provider template as a .json file and imports the same format. The files of the [Devolutions/PAM-Providers](https://github.com/Devolutions/PAM-Providers) repository use it too. This page lists the fields of that file, the values they accept, and the errors an import can return. To export or import a template, see [Create a custom PAM provider in Devolutions Server](https://docs.devolutions.net/pam/pam-with-devolutions-server/getting-started/custom-pam-providers/create-a-custom-pam-provider-in-devolutions-server.md#provider-templates-page).

## Structure

The file is a JSON object with two members. Field names are in camel case. A field whose value is the default (`0`, `false` or empty) can be left out: exported files omit it.

```json
{
  "version": 1,
  "template": {
    "id": "<GUID>",
    "name": "My provider",
    "description": "",
    "imageName": "",
    "providerProperties": [ { "id": "<GUID>", "name": "Endpoint", "type": 0, "isMandatory": true } ],
    "accountProperties": [ { "id": "<GUID>", "name": "Username", "type": 4, "isMandatory": true } ],
    "commands": {
      "resetPassword": {
        "id": "<GUID>",
        "commandType": 0,
        "isActive": true,
        "command": "<PowerShell script>",
        "parameters": [ { "name": "Endpoint", "propertyId": "<GUID>", "source": 0 } ]
      }
    }
  }
}
```

<table><thead><tr><th width="220">FIELD</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><code>version</code></td><td>Version of the file format. Devolutions Server exports <code>1</code>. A file without <code>version</code> and without <code>template</code> is refused.</td></tr><tr><td><code>template.id</code></td><td>GUID of the template. On import, an ID that already exists in Devolutions Server, built-in templates included, offers <em><strong>Override</strong></em> or <em><strong>Duplicate</strong></em>. <em><strong>Duplicate</strong></em> gives the template and its actions new IDs.</td></tr><tr><td><code>template.name</code></td><td>Name of the template.</td></tr><tr><td><code>template.description</code></td><td>Description of the template.</td></tr><tr><td><code>template.imageName</code>, <code>template.imageBytes</code></td><td>Icon of the template: the name of a built-in image, or the image itself.</td></tr><tr><td><code>template.isBuiltIn</code></td><td><code>true</code> for the templates included in Devolutions Server.</td></tr><tr><td><code>template.providerProperties</code></td><td>Properties of the provider. See <a href="#properties">Properties</a>.</td></tr><tr><td><code>template.accountProperties</code></td><td>Properties of the accounts. See <a href="#properties">Properties</a>.</td></tr><tr><td><code>template.commands</code></td><td>Actions of the template, keyed by action. See <a href="#actions">Actions</a>.</td></tr></tbody></table>

The file can also hold the same JSON as an escaped JSON string.

## Properties

<table><thead><tr><th width="220">FIELD</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><code>id</code></td><td>GUID of the property. Parameters refer to it in <code>propertyId</code>.</td></tr><tr><td><code>name</code></td><td>Name shown in the provider or account form. Account discovery matches the objects returned by the script on these names.</td></tr><tr><td><code>type</code></td><td>Type of the property, as a number. Default value: <code>0</code> (String).</td></tr><tr><td><code>isMandatory</code></td><td><code>true</code> when the form requires a value. Default value: <code>false</code>.</td></tr></tbody></table>

<table><thead><tr><th width="120">TYPE</th><th width="200">UI LABEL</th><th>VALUE PASSED TO THE SCRIPT</th></tr></thead><tbody><tr><td><code>0</code></td><td><em><strong>String</strong></em></td><td>String.</td></tr><tr><td><code>1</code></td><td><em><strong>Int</strong></em></td><td>Integer.</td></tr><tr><td><code>2</code></td><td><em><strong>Boolean</strong></em></td><td>Boolean. An empty value is passed as false.</td></tr><tr><td><code>3</code></td><td><em><strong>Password</strong></em></td><td>SecureString. One per list.</td></tr><tr><td><code>4</code></td><td><em><strong>Username</strong></em></td><td>String. One per list.</td></tr><tr><td><code>5</code></td><td><em><strong>Sensitive Data</strong></em></td><td>SecureString.</td></tr><tr><td><code>6</code></td><td><em><strong>Unique Identifier</strong></em></td><td>String. One per list. Required in the account properties for account discovery.</td></tr><tr><td><code>7</code></td><td><em><strong>Description</strong></em></td><td>String. One per list. In account discovery, its value becomes the account description.</td></tr><tr><td><code>8</code></td><td><em><strong>Field Mapping</strong></em></td><td>Used by version 1 propagation templates only.</td></tr></tbody></table>

## Actions

The keys of `commands` are `resetPassword`, `heartbeat` and `accountDiscovery`.

<table><thead><tr><th width="220">FIELD</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><code>id</code></td><td>GUID of the action.</td></tr><tr><td><code>commandType</code></td><td><code>0</code>: password rotation. <code>1</code>: heartbeat. <code>2</code>: account discovery.</td></tr><tr><td><code>isActive</code></td><td><code>true</code> when the action is enabled. Default value: <code>false</code>.</td></tr><tr><td><code>command</code></td><td>The PowerShell script.</td></tr><tr><td><code>resolutionMode</code></td><td>Script language. <code>0</code> (PowerShell) is the only value.</td></tr><tr><td><code>parameters</code></td><td>Script parameters. See below.</td></tr></tbody></table>

<table><thead><tr><th width="220">PARAMETER FIELD</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><code>name</code></td><td>Name of the script parameter, without the <code>$</code>.</td></tr><tr><td><code>propertyId</code></td><td>GUID of the property whose value is passed.</td></tr><tr><td><code>source</code></td><td><code>0</code>: a provider property. <code>1</code>: an account property. Default value: <code>0</code>.</td></tr></tbody></table>

The password rotation script also receives `NewPassword` as a SecureString; it is not listed in `parameters`.

## Import errors

<table><thead><tr><th width="300">MESSAGE</th><th>CAUSE</th></tr></thead><tbody><tr><td>"Couldn’t read the file because it may contain invalid data. Please check the file and try again."</td><td>The file is not valid JSON, or not in this format.</td></tr><tr><td>"The provider template '{0}' already exists."</td><td>The template ID is already used. Choose <em><strong>Override</strong></em>, <em><strong>Duplicate</strong></em> or <em><strong>Cancel</strong></em>.</td></tr><tr><td>"Provider templates cannot contain more than one username/password type property"</td><td>A property list has more than one Username, Password, Unique Identifier or Description property.</td></tr></tbody></table>

## Errors when the actions run

<table><thead><tr><th width="300">MESSAGE</th><th>CAUSE</th></tr></thead><tbody><tr><td>"PAM Provider Template not found"</td><td>The template of the provider no longer exists.</td></tr><tr><td>"No reset password command has been found on provider template: {0}"</td><td>Password rotation was requested and the template has no password rotation action.</td></tr><tr><td>"No heartbeat command has been found on the provider template: {0}"</td><td>A heartbeat was requested and the template has no heartbeat action.</td></tr><tr><td>"No account discovery command has been found on the provider template: {0}"</td><td>A scan was requested and the template has no account discovery action.</td></tr><tr><td>"Invalid type for property: '{0}' on account: '{1}'"</td><td>A mandatory property has no value, or its value does not match its type.</td></tr><tr><td>"Accounts must have a Username and a Unique Identifier type property to use the account discovery feature."</td><td>The account properties lack a Username or a Unique Identifier property.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/pam/pam-with-devolutions-server/custom-pam-provider-template-file-format.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
