---
title: IdP attribute mapper scripting API
description: The following bindings are available to IdP attribute mapper scripts.
component: pingoneaic
page_id: pingoneaic:am-scripting:saml2-idp-attribute-mapper-api
canonical_url: https://docs.pingidentity.com/pingoneaic/am-scripting/saml2-idp-attribute-mapper-api.html
---

# IdP attribute mapper scripting API

The following bindings are available to [IdP attribute mapper](../am-saml2/custom-idp-attribute-mapper.html) scripts.

|   |                                                                                                                                                                                |
| - | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|   | An IdP attribute mapper script can be either a legacy or a next-generation script. It has access to all the [common bindings](script-bindings.html) for its scripting context. |

| Binding                          | Description                                                         | Legacy type                                                                                                                                                                                          | Next-generation type                                                                                                                                                                                                                                                                                                                             |
| -------------------------------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `hostedEntityId`                 | The entity ID for the hosted IdP.                                   | String                                                                                                                                                                                               | String                                                                                                                                                                                                                                                                                                                                           |
| `idpAttributeMapperScriptHelper` | The helper object that provides context information for the script. | An [IdpAttributeMapperScriptHelper](../_attachments/apidocs/com/sun/identity/saml2/plugins/scripted/IdpAttributeMapperScriptHelper.html) instance containing methods used for IdP attribute mapping. | An instance of `IdpAttributeMapperScriptNextGenHelper`, which has the following method:`public List<Object> getStandardAttributes()`Returns a list of maps with the user attributes for the current session. For example:```json
[
  {
    "name:": "emailAddress",
    "nameFormat": null,
    "values": ["bjensen@example.com"]
  },
...
]
``` |
| `remoteEntityId`                 | The entity ID for the remote SP.                                    | String                                                                                                                                                                                               | String                                                                                                                                                                                                                                                                                                                                           |
| `session`                        | A representation of the user's SSO session object.                  | An [SSOToken](../_attachments/apidocs/com/iplanet/sso/SSOToken.html) object.                                                                                                                         | A `ScriptedSession` object.                                                                                                                                                                                                                                                                                                                      |
