---
title: Scripting
description: Guide to scripting for PingIDM.
component: pingidm
version: 8.1
page_id: pingidm:scripting-guide:preface
canonical_url: https://docs.pingidentity.com/pingidm/8.1/scripting-guide/preface.html
keywords: ["Scripting"]
page_aliases: ["index.adoc"]
---

# Scripting

> Guide to scripting for PingIDM.

|   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| - | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|   | Starting with IDM 8.1, the [legacy admin UI is deprecated](../release-notes/deprecated-functionality.html#legacy-admin-ui-deprecated) and is no longer bundled with IDM. New deployments should use the [Platform admin UI](../setup-guide/platform-admin-ui.html), which is the replacement for the legacy admin UI.Both UIs are available as separate downloads from the [Backstage download site](https://backstage.forgerock.com/downloads):- To install the Platform admin UI, follow the steps in [Install the Platform admin UI for standalone IDM](../setup-guide/platform-admin-ui.html).

- To continue using the legacy admin UI, follow the steps in [Install the legacy admin UI](../setup-guide/legacy-admin-ui.html). |

Scripting lets you extend IDM functionality. For example, you can provide custom logic between source and target mappings, define correlation rules, filters, triggers, and so on. This guide shows you how to use scripts in IDM and provides reference information on the script engine.

[icon: cogs, set=fad, size=3x]

#### [Script Configuration](script-config.html)

Modify the parameters to compile, debug, and run scripts.

[icon: wrench, set=fad, size=3x]

#### [Custom Endpoints](script-custom-endpoints.html)

Run arbitrary scripts through the REST URI.

[icon: play-circle, set=fad, size=3x]

#### [Script Triggers](script-triggers.html)

Learn where and how you can trigger scripts.

[icon: file-code, set=fad, size=3x]

#### [Script Variables](script-vars.html)

Learn about the variables available to scripts.

IDM supports scripts written in JavaScript and Groovy, and uses the following libraries:

* Rhino version 1.7.14 to run JavaScript.

  |   |                                                                                                                                                                                  |
  | - | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  |   | Rhino has limited support for ES6 / ES2015 (JavaScript version 1.7). For more information, refer to [Rhino ES2015 Support](https://mozilla.github.io/rhino/compat/engines.html). |

* Groovy version 3.0.22 for Groovy script support.

* Lodash 3.10.1 and Handlebars 4.7.7 for Rhino scripting.

  |   |                                                                                                                                                                                                                                                                                                                                                                                  |
  | - | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  |   | Using Handlebars JS in server-side JS scripts requires *synchronization*; for example:```javascript
  var Handlebars = require("lib/handlebars");
  var result = new Packages.org.mozilla.javascript.Synchronizer(function() {
    var template = Handlebars.compile("Handlebars {{doesWhat}}");
    return template({ doesWhat: "rocks!" });
  }, Handlebars)();
  console.log(result);
  ``` |

* BouncyCastle 1.70 for signing JWTs.

  |   |                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
  | - | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  |   | The BouncyCastle .JAR file that is bundled with IDM includes the `org.bouncycastle.asn1.util.Dump` command-line utility. Although this utility is not used directly by IDM, it is possible to reference the utility in your scripts. Due to a security vulnerability in this utility, you should *not* reference it in your scripts. For more information, refer to the corresponding [BouncyCastle issue](https://github.com/bcgit/bc-java/issues/634). |

|   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| - | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | Script options and locations are defined in the script configuration *(tooltip: You can manage the script configuration over REST at the config/script endpoint, or directly in the conf/script.json file.)*.Default scripts are located in (`/path/to/openidm/bin/defaults/script/`). Do not modify the scripts in this directory. Rather copy the default scripts to a different location, make the changes, and update the referenced scripts in the applicable `conf/` file. You can put custom scripts in any of the locations referenced in the `sources` property in `conf/script.json`. |
