---
title: Session Attribute Map
description: Map the value of an AM session attribute to one or more HTTP headers, HTTP cookies, or request attributes, depending on the value of Session Attribute Fetch Mode. The session attribute is the attribute in the session to be fetched.
component: java-agents
version: 2025.11
page_id: java-agents:properties-reference:org.forgerock.agents.session.attribute.map
canonical_url: https://docs.pingidentity.com/java-agents/2025.11/properties-reference/org.forgerock.agents.session.attribute.map.html
---

# Session Attribute Map

Map the value of an AM session attribute to one or more HTTP headers, HTTP cookies, or request attributes, depending on the value of [Session Attribute Fetch Mode](org.forgerock.agents.session.attribute.fetch.mode.html). The session attribute is the attribute in the session to be fetched.

* Map key: The name of an AM session attribute

* Map value: The name of one or more HTTP headers, HTTP cookies, or request attributes

Consider the following points for HTTP cookies:

* If an HTTP cookie with the mapped name does not exist, the agent creates it.

* If an HTTP cookie with the mapped name already exists and the cookie value is different from the mapped value, the agent overwrites the cookie.

* If an HTTP cookie with the mapped name already exists and the cookie value is the same as the mapped value, the agent does nothing.

* If the profile attribute name (key) does not exist, the agent does not create the HTTP cookie.

* The agent does not automatically clear cookies. To prevent a build up of cookies, consider adding them to the [Reset Cookie List](org.forgerock.agents.cookie.reset.name.list.html).

Consider the following points for HTTP headers:

* If an HTTP header with the mapped name does not exist, the agent creates it.

* If an HTTP header with the mapped name already exists, the agent does not overwrite it but simply appends information to the header.

* If the profile attribute name (key) does not exist, the agent does not create the response header.

* When an HTTP header name is used in a request header, it is prefixed by `HTTP_`. The agent automatically changes lower case letters to upper case, and hyphens (`-`) to underscores (`_`). For example, `CUSTOM-userid` becomes `HTTP_CUSTOM_USERID`.

Format: `session attribute = HEADER-NAME(S)`, `session attribute = COOKIE-NAME(S)`, `session attribute = REQUEST-ATTRIBUTE(S)`

Default: Empty

Examples:

In the following example, the AM response attribute `uid` is mapped to `CUSTOM-User-Name`: `com.sun.identity.agents.config.response.attribute.mapping[uid]=Custom-User-Name`

Example: `[UserToken]=HEADER-1|HEADER-2`

|                          |                                                                                                                                                                                                                                             |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Property name            | `org.forgerock.agents.session.attribute.map`                                                                                                                                                                                                |
| Aliases                  | `org.forgerock.agents.session.attribute.map`   Introduced in Java Agent 5.6`com.sun.identity.agents.config.session.attribute.mapping`   Introduced in Java Agent 5.0   [Recognized](preface.html#how_am_manages_multiple_aliases) from AM 6 |
| Function                 | Session                                                                                                                                                                                                                                     |
| Type                     | Map- Keys: source session attribute name

- Values: one or more target session attribute names                                                                                                                                              |
| Bootstrap property       | No                                                                                                                                                                                                                                          |
| Required property        | No                                                                                                                                                                                                                                          |
| Restart required         | No                                                                                                                                                                                                                                          |
| Local configuration file | `AgentConfig.properties`                                                                                                                                                                                                                    |
| AM console               | Tab: `Application`Title: `Session Attribute Map`Legacy title: `Session Attribute Mapping`                                                                                                                                                   |
