> 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/getting-started/custom-pam-providers/create-a-custom-pam-provider-in-devolutions-server.md). Agents can also search and read this documentation through its [MCP server](https://docs.devolutions.net/~gitbook/mcp).

# Create a custom PAM provider in Devolutions Server

Build custom PAM templates and providers in Devolutions Server by mapping action scripts to provider and account properties for each action.

Custom PAM providers are built and managed using templates. Templates leverage the efforts of Devolutions and the community to build providers, reducing the need for users to create them from scratch.

A template is an object within Devolutions PAM that serves as a framework for constructing a custom PAM provider.

Templates guide Devolutions Server in mapping the action script parameters and outputs to Devolutions PAM internal properties, facilitating the input and exchange of information. Templates enable users to populate the properties of an identity provider to create a provider.

Create a custom template or import one of the templates that already exist.

{% hint style="warning" %}
The [WinRM](https://docs.devolutions.net/server/knowledge-base/how-to-articles/enable-winrm-and-add-trusted-hosts) needs to be enabled for this to work.
{% endhint %}

## Provider templates page

Custom PAM provider templates are listed on the ***Provider templates*** page. To open it, go to ***Administration*** – ***Privileged access management (PAM)*** – ***Providers***, then click the ***Custom PAM provider templates*** button. When no provider exists yet, the ***Browse templates*** link of the empty providers list opens the same page.

The built-in templates (***MySQL User***, ***Oracle User*** and ***Cisco user***) are not listed on this page. They are offered when adding a provider, under ***Password reset only***. See [Custom PAM providers](https://docs.devolutions.net/pam/pam-with-devolutions-server/providers/custom-pam-providers.md#built-in-templates).

<table><thead><tr><th width="230">TOOLBAR BUTTON</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><em><strong>Add</strong></em></td><td>Opens the <em><strong>Custom PAM provider template</strong></em> dialog to create a template.</td></tr><tr><td><em><strong>Import</strong></em></td><td>Imports a template from a .json file. See <a href="#import-a-custom-pam-template">Import a custom PAM template</a>.</td></tr><tr><td>GitHub</td><td>Opens the public <a href="https://github.com/Devolutions/PAM-Providers">Devolutions/PAM-Providers</a> repository, where Devolutions publishes ready-made templates.</td></tr><tr><td><em><strong>Refresh</strong></em></td><td>Reloads the list.</td></tr></tbody></table>

The list shows the template image, ***Name*** and ***Description***. The ***Columns*** button chooses the visible columns, and ***Reset*** restores the default columns. When the list is empty, it shows "No data to display".

<table><thead><tr><th width="230">ROW ACTION</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><em><strong>Edit</strong></em></td><td>Opens the template in the <em><strong>Custom PAM provider template</strong></em> dialog.</td></tr><tr><td><em><strong>Add provider</strong></em></td><td>Creates a provider from this template. Requires the permission to add PAM providers.</td></tr><tr><td><em><strong>Export</strong></em></td><td>Downloads the template as <code>&#x3C;template name>.json</code>. The file format is described in <a href="https://docs.devolutions.net/pam/pam-with-devolutions-server/custom-pam-provider-template-file-format.md">Custom PAM provider template file format</a>.</td></tr><tr><td><em><strong>Delete</strong></em></td><td>Deletes the template after the "Delete '{0}'?" confirmation (title "Delete confirmation", button <em><strong>Delete</strong></em>). Disabled, with the tooltip "Is used by one or more providers", while a provider uses the template.</td></tr></tbody></table>

<table><thead><tr><th width="230">ACTION</th><th>REQUIRED ADMINISTRATIVE PERMISSION</th></tr></thead><tbody><tr><td>Open the page</td><td>View custom provider templates (PAM settings)</td></tr><tr><td><em><strong>Add</strong></em>, <em><strong>Import</strong></em>, <em><strong>Test script</strong></em></td><td>Add custom provider templates (PAM settings)</td></tr><tr><td><em><strong>Edit</strong></em>, <em><strong>Test script</strong></em></td><td>Edit custom provider templates (PAM settings). Without it, the dialog opens read-only with a <em><strong>Close</strong></em> button.</td></tr><tr><td><em><strong>Export</strong></em></td><td>Export custom provider templates (PAM settings)</td></tr><tr><td><em><strong>Delete</strong></em></td><td>Delete custom provider templates (PAM settings)</td></tr><tr><td><em><strong>Add provider</strong></em></td><td>Add PAM providers</td></tr></tbody></table>

### Create a custom PAM template

Once the [action scripts](https://docs.devolutions.net/pam/concepts/action-script.md) have been created, the next step is to develop the custom PAM template within Devolutions Server.

1. In Devolutions Server, go to ***Administration*** – ***Privileged access management (PAM)*** – ***Providers***.
2. Click on ***Custom PAM provider templates***.
3. Click ***Add*** to create a new template.
4. In ***General***, provide a ***Name*** (mandatory) and a ***Description*** (optional) for your new template. It is also possible to change the displayed icon.
5. Three actions can be enabled, each with their own script. Check the boxes next to the ones that you wish this provider to implement.

   * ***Password rotation***, to reset account passwords.
   * ***Heartbeat***, to synchronize accounts.
   * ***Account discovery***, for scanning.

   <div data-gb-custom-block data-tag="hint" data-style="success" class="hint hint-success"><p>While it is not mandatory to enable each action, it is recommended to do so to fully leverage the benefits of a custom PAM provider.</p></div>
6. In ***Provider properties*** and ***Account properties***, set the fields that the providers and accounts will implement.

   * ***Provider properties*** define the attributes the custom PAM provider uses to authenticate and connect to an identity provider. These properties may include username, password, hostname, or any other unique attribute of an identity provider.
   * ***Account properties*** are attributes related to a specific account on an identity provider. Common account properties include ID, username, and secret. Account properties uniquely identify provider accounts and provide a value to store an account's password or other secure credentials.

   Add properties by clicking on ***Add property***. For each property, provide a ***Name*** and a ***Type***. Below is a list of the different types:

   * ***Boolean***
   * ***Description*** (string)
   * ***Int***
   * ***Password*** (SecureString)
   * ***Sensitive Data*** (SecureString)
   * ***String***
   * ***Unique Identifier*** (string)
   * ***Username*** (string)

   <div data-gb-custom-block data-tag="hint" data-style="success" class="hint hint-success"><p>Make sure to provide a Unique Identifier type if you plan on using account discovery. This field helps track which account have been added since the last scan.</p></div>
7. Check the ***Mandatory*** box next to a property if the fields are required for creation/editing.
8. For each action that was enabled in the ***General*** section, go to the corresponding section in the left menu.
9. Map the properties of the provider/account that the script needs to work by providing the following:

   * ***Name***: Name of the variable in the script.
   * ***Source***: If the value is provided by the provider or the account.
   * ***Property***: The source property that will be injected into the script.

   All actions have associated action scripts with at least two or three parameters. Custom PAM providers must understand how to map a property to a script parameter to define the relationship between the custom PAM provider object (provider or account) and each action script. Script parameters allow you to specify to the custom PAM provider which parameters each of your action scripts possesses and which custom PAM provider property that script parameter should be mapped to. If need be, you can add other script parameters.
10. Insert the script of the action by either browsing on your computer to find it or manually editing the ***Script*** field. You can also generate a base script to build upon.
11. Test your script once it is complete, then click ***Add*** to save your new template. Your new custom PAM template has been created and can be found in the templates list. You can skip to the Create a custom PAM provider section.

#### Custom PAM provider template dialog

The dialog is titled ***Custom PAM provider template***. Its left menu has ***General*** under ***Common***, and ***Provider properties***, ***Account properties*** and one section per enabled action under ***Privileged access management (PAM)***. The footer has ***Add*** (new template) or ***Update*** (existing template), and ***Cancel***.

<table><thead><tr><th width="230">SETTING</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><em><strong>Name</strong></em></td><td>Name of the template. Required.</td></tr><tr><td><em><strong>Description</strong></em></td><td>Optional description, shown in the templates list.</td></tr><tr><td>Image</td><td>Icon shown for the template and its providers.</td></tr><tr><td><em><strong>Account discovery</strong></em></td><td>Enables the account discovery action and adds its section. Its information tooltip reads "Accounts must have a Username and a Unique Identifier type property to use the account discovery feature."</td></tr><tr><td><em><strong>Heartbeat</strong></em></td><td>Enables the heartbeat action and adds its section.</td></tr><tr><td><em><strong>Password rotation</strong></em></td><td>Enables the password rotation action and adds its section.</td></tr></tbody></table>

<table><thead><tr><th width="230">PROPERTY RULE</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td>Default properties</td><td>A new template starts with the provider properties <em><strong>Username</strong></em> (mandatory), <em><strong>Password</strong></em> and <em><strong>Description</strong></em>, and the same three account properties.</td></tr><tr><td>Property row</td><td><em><strong>Name</strong></em> (required), <em><strong>Type</strong></em> (required), <em><strong>Mandatory</strong></em>, and a delete button. A property added with <em><strong>Add property</strong></em> is mandatory by default.</td></tr><tr><td>Unique types</td><td><em><strong>Password</strong></em>, <em><strong>Username</strong></em>, <em><strong>Unique Identifier</strong></em> and <em><strong>Description</strong></em> can each be used once per list. Saving a list with two Username or two Password properties fails with "Provider templates cannot contain more than one username/password type property".</td></tr><tr><td>Mandatory</td><td>The provider or account form requires a value for a mandatory property.</td></tr><tr><td>Field mapping</td><td>The <em><strong>Field Mapping</strong></em> type is not offered in provider templates; it is used by legacy propagation templates.</td></tr></tbody></table>

<table><thead><tr><th width="230">PROPERTY TYPE</th><th>VALUE PASSED TO THE SCRIPT</th></tr></thead><tbody><tr><td><em><strong>String</strong></em>, <em><strong>Username</strong></em>, <em><strong>Unique Identifier</strong></em>, <em><strong>Description</strong></em></td><td>String.</td></tr><tr><td><em><strong>Int</strong></em></td><td>Integer.</td></tr><tr><td><em><strong>Boolean</strong></em></td><td>Boolean. An empty value is passed as false.</td></tr><tr><td><em><strong>Password</strong></em>, <em><strong>Sensitive Data</strong></em></td><td>SecureString.</td></tr></tbody></table>

#### Action sections

Each enabled action has its own section, with a ***Parameters*** fieldset and a ***Script*** fieldset.

<table><thead><tr><th width="230">SETTING</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><em><strong>NewPassword</strong></em> row</td><td>Password rotation only. A fixed row with <em><strong>Source</strong></em> "System" and <em><strong>Property</strong></em> "Not applicable". Its tooltip reads "Password reset script must have a parameter named "NewPassword" of type "SecureString"". Devolutions Server passes the new password in this parameter.</td></tr><tr><td><em><strong>Name</strong></em></td><td>Name of the script parameter, without the <code>$</code>.</td></tr><tr><td><em><strong>Source</strong></em></td><td><em><strong>Provider</strong></em> or <em><strong>Account</strong></em>. The account discovery action accepts <em><strong>Provider</strong></em> only, because it runs before accounts exist.</td></tr><tr><td><em><strong>Property</strong></em></td><td>The provider or account property whose value is passed. Placeholder: "Select from list".</td></tr><tr><td><em><strong>Add script parameter</strong></em></td><td>Adds a parameter row.</td></tr><tr><td>Language</td><td>PowerShell. It is the only script language and cannot be changed.</td></tr><tr><td><em><strong>Browse...</strong></em></td><td>Loads the script from a .ps1 file.</td></tr><tr><td><em><strong>Edit</strong></em></td><td>Opens the script editor. See <a href="#script-editor-and-test">Script editor and test</a>.</td></tr><tr><td><em><strong>Generate base script</strong></em></td><td>Shown while the script is empty. Writes a <code>[CmdletBinding()]</code> <code>Param()</code> block with one mandatory parameter per mapped parameter, typed from the property: <code>[Int]</code>, <code>[Bool]</code>, <code>[SecureString]</code> for Password and Sensitive Data, <code>[String]</code> for the other types. For password rotation, a <code>[SecureString]$NewPassword</code> parameter is added.</td></tr><tr><td><em><strong>Test script</strong></em></td><td>Runs the script from the template dialog with test values.</td></tr></tbody></table>

A warning is shown in the action section when the account properties do not include a Username and a Unique Identifier property. The ***Add*** or ***Update*** button stays disabled while an enabled action has no script, or while account discovery is enabled and no account property of the Unique Identifier type has a name.

#### Script editor and test

The script editor is titled ***Script (\<action>)*** and has three tabs: ***Script***, ***Test configurations*** and ***Results***. Its footer has ***Test script***, ***Save*** and ***Close***.

<table><thead><tr><th width="230">SETTING</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><em><strong>Arguments</strong></em></td><td>One field per script parameter, with <em><strong>NewPassword</strong></em> first for password rotation. SecureString fields are masked.</td></tr><tr><td><em><strong>PowerShell settings</strong></em> – <em><strong>Credential</strong></em></td><td><em><strong>None</strong></em> runs the test on the Devolutions Server machine, under the account of the Devolutions Server service. <em><strong>Default</strong></em> shows <em><strong>Username</strong></em> (required), <em><strong>Password</strong></em> (required) and <em><strong>Hostname</strong></em>: the test runs with these credentials, on the host when one is entered, through the new WinRM client.</td></tr><tr><td><em><strong>Results</strong></em></td><td>Shows the objects the script returned, with "Count: n", or the error the script wrote. Before the first run it shows "No results yet"; a run without output shows "No results".</td></tr></tbody></table>

The test is sent to Devolutions Server, which runs the script and returns its output. Testing requires the permission to add or edit custom provider templates.

#### Template example

Below is an example of values for a completed custom PAM template based on the following action scripts:

```powershell
[CmdletBinding()]
param(
    [Parameter(Mandatory)]
    [string]$IdentityProviderEndpoint,

    [Parameter(Mandatory)]
    [string]$IdentityProviderEndpointUserName,

    [Parameter(Mandatory)]
    [securestring]$IdentityProviderEndpointPassword
)
```

```powershell
[CmdletBinding()]
param(
    [Parameter(Mandatory)]
    [string]$IdentityProviderEndpoint,

    [Parameter(Mandatory)]
    [string]$IdentityProviderEndpointUserName,

    [Parameter(Mandatory)]
    [securestring]$IdentityProviderEndpointPassword,

    [Parameter(Mandatory)]
    [securestring]$NewPassword,

    [Parameter(Mandatory)]
    [string]$AccountUserName
)
```

```powershell
[CmdletBinding()]
param(
    [Parameter(Mandatory)]
    [string]$IdentityProviderEndpoint,

    [Parameter(Mandatory)]
    [string]$IdentityProviderEndpointUserName,

    [Parameter(Mandatory)]
    [securestring]$IdentityProviderEndpointPassword,

    [Parameter(Mandatory)]
    [securestring]$AccountSecret,

    [Parameter(Mandatory)]
    [string]$AccountUserName
)
```

**Provider properties**

| Property name                    | Property type | Mandatory |
| -------------------------------- | ------------- | --------- |
| IdentityProviderEndpoint         | String        | Yes       |
| IdentityProviderEndpointUserName | UserName      | Yes       |
| IdentityProviderEndpointPassword | Password      | Yes       |

**Account properties**

| Property name   | Property type    | Mandatory |
| --------------- | ---------------- | --------- |
| AccountUserName | UniqueIdentifier | Yes       |
| AccountSecret   | Password         | Yes       |

**Script parameter types**

| Parameter name                   | Action(s)                                       | Property                         | Source   | Mandatory |
| -------------------------------- | ----------------------------------------------- | -------------------------------- | -------- | --------- |
| IdentityProviderEndpoint         | Password rotation, Heartbeat, Account discovery | IdentityProviderEndpoint         | Provider | Yes       |
| IdentityProviderEndpointUserName | Password rotation, Heartbeat, Account discovery | IdentityProviderEndpointUserName | Provider | Yes       |
| IdentityProviderEndpointPassword | Password rotation, Heartbeat, Account discovery | IdentityProviderEndpointPassword | Provider | Yes       |
| NewPassword                      | Password Rotation                               | N/A                              | System   | Yes       |
| AccountUserName                  | Password rotation, Heartbeat                    | AccountUserName                  | Account  | Yes       |
| AccountSecret                    | Heartbeat                                       | AccountSecret                    | Account  | Yes       |

{% hint style="warning" %}
Account discovery needs an account property of the ***Username*** type and one of the ***Unique Identifier*** type. With only the account properties of this example, a scan fails with "Accounts must have a Username and a Unique Identifier type property to use the account discovery feature." Add a Username-type account property to use account discovery.
{% endhint %}

### Import a custom PAM template

{% embed url="<https://youtu.be/hsLuhLJjCaM?t=112>" %}

{% hint style="info" %}
You can access our public [GitHub repository](https://github.com/Devolutions/PAM-Providers) to find custom PAM providers made by the Devolutions team and instructions on how to use them.
{% endhint %}

1. In Devolutions Server, go to ***Administration*** – ***Privileged access management (PAM)*** – ***Providers***.
2. Click on ***Custom PAM provider templates***.
3. Click on ***Import***.
4. Upload your .json file, then click on ***Import***.
5. Adapt the template settings if need be, then click on ***Add***.

Your template has now been imported and can be found in the ***Provider templates*** list.

<table><thead><tr><th width="230">CASE</th><th>BEHAVIOR</th></tr></thead><tbody><tr><td><em><strong>Import</strong></em> dialog</td><td><em><strong>Select a file</strong></em> picks the .json file. The dialog has <em><strong>Import</strong></em> and <em><strong>Close</strong></em>.</td></tr><tr><td>New template</td><td>The <em><strong>Custom PAM provider template</strong></em> dialog opens with the imported values. Saving shows "Import successful".</td></tr><tr><td>Template ID already in Devolutions Server</td><td>The warning "The provider template '{0}' already exists." offers <em><strong>Override</strong></em>, <em><strong>Duplicate</strong></em> and <em><strong>Cancel</strong></em>. The built-in templates count as existing templates.</td></tr><tr><td><em><strong>Override</strong></em></td><td>Asks "Do you want to override this provider template?", then replaces the existing template with the file.</td></tr><tr><td><em><strong>Duplicate</strong></em></td><td>Opens the dialog with a new template named "&#x3C;name> - Copy".</td></tr><tr><td>Unreadable file</td><td>"Couldn’t read the file because it may contain invalid data. Please check the file and try again."</td></tr></tbody></table>

### Create a custom PAM provider

Once your template has been created or imported, you are ready to create a custom PAM provider.

1. Go to ***Administration*** – ***Privileged access management (PAM)*** – ***Providers***, then click ***Add***.
2. Go to ***Custom*** in the left menu, then select your new template in the list. Click ***Continue***.
3. In the ***Provider*** configuration page, provide a ***Name*** and a ***Username***, as this information is mandatory. Then, if necessary, set the other options according to your needs.
4. Click ***Save***.

Your new custom PAM provider has been created and can be found in the providers list.

In the ***Add new PAM provider*** dialog, the ***Custom*** category appears only when at least one custom template exists. The built-in templates are in the ***Password reset only*** category. The provider settings are described in [Create a custom PAM provider from a template](https://docs.devolutions.net/pam/pam-with-devolutions-server/getting-started/custom-pam-providers/create-a-custom-pam-provider-from-a-template.md#custom-provider-settings).

#### See also

* [Devolutions Academy - Configuring a custom PAM provider](https://academy.devolutions.net/student/path/2354099/activity/3423448)
* [Custom PAM provider template file format](https://docs.devolutions.net/pam/pam-with-devolutions-server/custom-pam-provider-template-file-format.md)
* [Custom PAM provider action scripts in Devolutions Server](https://docs.devolutions.net/pam/knowledge-base/knowledge-base-articles/custom-pam-provider-action-scripts-in-devolutions-server.md)


---

# 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/getting-started/custom-pam-providers/create-a-custom-pam-provider-in-devolutions-server.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.
