---
title: IdP attribute mapper scripting API
description: The following bindings are available to IdP attribute mapper scripts.
component: pingam
version: 8.1
page_id: pingam:am-scripting:saml2-idp-attribute-mapper-api
canonical_url: https://docs.pingidentity.com/pingam/8.1/am-scripting/saml2-idp-attribute-mapper-api.html
page_aliases: ["scripting-guide:saml2-idp-attribute-mapper-api.adoc"]
---

# 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                          | Legacy                                                                                                                                                                                                                                                      | Next-generation                                                                                                                                                                                                                                                                                                                                  |
| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `hostedEntityId`                 | The entity ID for the hosted IdP.                                                                                                                                                                                                                           |                                                                                                                                                                                                                                                                                                                                                  |
| `idpAttributeMapperScriptHelper` | 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.                                                                                                                                                                                                                            |                                                                                                                                                                                                                                                                                                                                                  |
| `session`                        | Contains a representation of the user's SSO session object. Refer to the [SSOToken](../_attachments/apidocs/com/iplanet/sso/SSOToken.html) interface for information about SSO token and authentication information, as well as session-related properties. |                                                                                                                                                                                                                                                                                                                                                  |
