---
title: Use ESVs in scripts
description: PingOne Advanced Identity Cloud lets scripts access ESVs directly, without the need for you to restart Advanced Identity Cloud services or request a promotion first.
component: pingoneaic
page_id: pingoneaic:tenants:esvs-scripting
canonical_url: https://docs.pingidentity.com/pingoneaic/tenants/esvs-scripting.html
keywords: ["Environment secrets and variables (ESVs)", "Scripts"]
section_ids:
  am_scripts: AM scripts
  idm_scripts: IDM scripts
---

# Use ESVs in scripts

PingOne Advanced Identity Cloud lets scripts access [ESVs](esvs.html) directly, without the need for you to restart Advanced Identity Cloud services or request a promotion first.

|   |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| - | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | Ensure that your scripts use the full reference for ESVs; for example `esv.my.variable` not `my.variable`. Scripts with an incorrect reference can cause promotions to fail.Referencing a non-existent ESV in a script, even within comments, can lead to system errors. Ensure that all ESVs mentioned in the script are valid and exist.Ping Identity recommends that you establish a review and testing process for all scripts. |

## AM scripts

To access an ESV with the name `esv-my-variable` in an AM script, use:

```
systemEnv.getProperty("esv.my.variable")
```

Learn more about using the `systemEnv` binding in [ESVs in scripts](../am-scripting/script-bindings.html#common-systemenv).

## IDM scripts

To access an ESV with the name `esv-my-variable` in an IDM script, use:

```
identityServer.getProperty("esv.my.variable")
```

Learn more about using the `identityServer` variable in [The `identityServer` variable](../idm-scripting/script-variables-identity-server.html).
