---
title: Set Success Details node
description: The Set Success Details node adds additional details to the JSON response on successful authentication. You can add details to the response body and set custom response headers.
component: auth-node-ref
version: latest
page_id: auth-node-ref::set-success-details
canonical_url: https://docs.pingidentity.com/auth-node-ref/latest/set-success-details.html
keywords: ["Nodes &amp; Trees", "Journeys", "Authentication"]
superseded_by: https://docs.pingidentity.com/auth-node-ref/latest/set-success-details.html
section_ids:
  examples: Examples
  example_1_add_static_content_and_session_properties: "Example 1: Add static content and session properties"
  example_2_add_dynamic_content: "Example 2: Add dynamic content"
  example_3_set_custom_response_headers: "Example 3: Set custom response headers"
  example_4_add_a_message_to_the_success_response_in_a_no_session_journey: "Example 4: Add a message to the success response in a no session journey"
  availability: Availability
  inputs: Inputs
  dependencies: Dependencies
  configuration: Configuration
  outputs: Outputs
  callbacks: Callbacks
  outcomes: Outcomes
  errors: Errors
---

# Set Success Details node

The Set Success Details node adds additional details to the JSON response on successful authentication. You can add details to the response body and set custom response headers.

* Response body

  You can add either or both of the following to the JSON response:

  * Success details: Lets you add static `key:value` fields to the JSON response.

  * Session properties: Lets you add `key:value` fields to the JSON response, where `value` corresponds to the value of the specified session property.

    This lets you retrieve session properties in the journey without needing additional post-authentication processing.

  You can't override the default `tokenId`, `successUrl`, and `realm` fields returned in the JSON response.

* Response headers

  You can set custom headers to include in the JSON response.

  You can't modify the protected HTTP headers, nor can you modify the session cookie or load balancer cookie using the `Set-Cookie` header.

  > **Collapse: Protected HTTP headers**
  >
  > * `X-Frame-Options`
  >
  > * `X-Content-Type-Options`
  >
  > * `Cache-Control`
  >
  > * `Content-API-Version`
  >
  > * `Expires`
  >
  > * `Pragma`
  >
  > * `Content-Type`
  >
  > * `Content-Length`
  >
  > * `Date`
  >
  > * `Keep-Alive`
  >
  > * `Connection`
  >
  > * `Transfer-Encoding`
  >
  > * `Server`
  >
  > * `Trailer`
  >
  > * `Upgrade`

The success details and response headers are set when the node is processed, regardless of whether a session is created or not. This lets you set additional details in no session journeys or when the `noSession` query parameter is used during authentication.

## Examples

### Example 1: Add static content and session properties

This example uses the Set Success Details node to add the following additional details to the JSON response:

* A static `authMethod:password` field.

* A `universalId` session property, which returns the corresponding value from the session when the user authenticates.

![Journey with a Set Success Details node](_images/set-success-details-journey.png)

* The [Page node](page.html) containing the [Platform Username node](platform-username.html) and [Platform Password node](platform-password.html) prompts for credentials.

* The [Data Store Decision node](data-store-decision.html) validates the username-password credentials.

* The [Increment Login Count node](increment-login-count.html) updates the number of successful authentications in the user profile.

* The Set Success Details node adds the additional configured details to the JSON response upon successful authentication. This example uses the following configuration:

  * Success Details

    Key: `authMethod`

    Value: `password`

  * Session Properties

    Key: `universalId`

    Value: `sun.am.UniversalIdentifier`

When the user authenticates successfully using this journey, the JSON response includes the additional details you configured. For example:

```json
{
    "tokenId": "AQIC5wM…​TU3OQ*",
    "successUrl": "/enduser/?realm=/alpha",
    "realm": "/alpha",
    "universalId": "id=bjensen,ou=user,o=alpha,ou=services,ou=am-config",
    "authMethod": "password"
}
```

### Example 2: Add dynamic content

This example uses the [Configuration Provider node](config-provider.html) to imitate the Set Success Details node. Using the Configuration Provider node lets you add dynamic content to the JSON response, such as an API response, in addition to static content and session properties.

![Journey with a Configuration Provider node imitating the Set Success Details node](_images/set-success-details-journey-dynamic.png)

Find more information in [Example 2: Imitate the Set Success Details node](config-provider.html#example2).

### Example 3: Set custom response headers

This example uses the Set Success Details node to set a `Custom-Auth` response header on successful authentication. This header could be read by a legacy API gateway or reverse proxy that uses Advanced Identity Cloud to handle the authentication logic.

![Journey with a Set Success Details node](_images/set-success-details-journey.png)

* The [Page node](page.html) containing the [Platform Username node](platform-username.html) and [Platform Password node](platform-password.html) prompts for credentials.

* The [Data Store Decision node](data-store-decision.html) validates the username-password credentials.

* The [Increment Login Count node](increment-login-count.html) updates the number of successful authentications in the user profile.

* The Set Success Details node sets the response header upon successful authentication. This example uses the following configuration:

  * Response Headers

    Key: `Custom-Auth`

    Value: `username-password`

Follow these steps to try the example:

1. Create the example journey using the journey editor.

2. Authenticate a test user with the journey. Make sure you include the `--show-headers` option (or `--include` in older `curl` versions) to return the response headers:

   ```bash
   $ curl --show-headers \
   --request POST \
   --header 'X-OpenAM-Username: bjensen' \
   --header 'X-OpenAM-Password: Ch4ng3it!' \
   --header "Accept-API-Version: resource=2.1, protocol=1.0" \
   "https://tenant-env-fqdn/am/json/realms/root/realms/alpha/authenticate?authIndexType=service&authIndexValue=myJourney"

   HTTP/1.1 200
   X-Frame-Options: SAMEORIGIN
   X-Content-Type-Options: nosniff
   ...
   Custom-Auth: username-password
   ...

   {
       "tokenId": "AQIC5wM…​TU3OQ*",
       "successUrl": "/enduser/?realm=/alpha",
       "realm": "/alpha"
   }
   ```

### Example 4: Add a message to the success response in a no session journey

This example uses the Set Success Details node to add a message to the success response in a no session journey.

![Journey with a Set Success Details node](_images/set-success-details-journey.png)

* The [Page node](page.html) containing the [Platform Username node](platform-username.html) and [Platform Password node](platform-password.html) prompts for credentials.

* The [Data Store Decision node](data-store-decision.html) validates the username-password credentials.

* The [Increment Login Count node](increment-login-count.html) updates the number of successful authentications in the user profile.

* The Set Success Details node adds the additional configured details to the JSON response upon successful authentication. This example uses the following configuration:

  * Success Details

    Key: `message`

    Value: `Authentication Successful`

Follow these steps to try the example:

1. Create the example journey using the journey editor.

2. Authenticate a test user with the journey. Make sure you include the `noSession` query parameter:

   ```bash
   $ curl \
   --request POST \
   --header 'X-OpenAM-Username: bjensen' \
   --header 'X-OpenAM-Password: Ch4ng3it!' \
   --header "Accept-API-Version: resource=2.1, protocol=1.0" \
   "https://tenant-env-fqdn/am/json/realms/root/realms/alpha/authenticate?authIndexType=service&authIndexValue=myJourney&noSession=true"

   {
       "successUrl": "/enduser/?realm=/alpha",
       "realm": "/alpha",
       "message": "Authentication Successful"
   }
   ```

   You can configure the journey as a no session journey instead of using the `noSession` query parameter. Learn more in [Configure a no session journey](https://docs.pingidentity.com/pingoneaic/am-authentication/configure-authentication-trees.html#configure-nosession-tree).

## Availability

| Product                               | Available? |
| ------------------------------------- | ---------- |
| PingOne Advanced Identity Cloud       | Yes        |
| PingAM (self-managed)                 | Yes        |
| Ping Identity Platform (self-managed) | Yes        |

## Inputs

None. This node doesn't read shared state data.

## Dependencies

Make sure the user can successfully authenticate and get a session if you've configured the node to set session properties.

If this node is configured to set session properties and is added to a no session journey or the `noSession` query parameter is used during authentication, the journey will fail.

## Configuration

| Property           | Usage                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Success Details    | The success details to add:- To add a static field:

  1. Click [icon: plus, set=fa]Add in the Success Details modal.

  2. Enter the field name to display in the Key field and the corresponding value to display in the Value field.

     The value can be a simple text string, a boolean value, or a JSON formatted value. The value is formatted appropriately when output in the JSON response.

     For example:

     Key	Value	Output&#xA;&#xA;example&#xA;&#xA;&#x9;&#xA;&#xA;this is a test value&#xA;&#xA;&#x9;&#xA;"example": "this is a test value"&#xA;&#xA;&#xA;&#xA;boolean&#xA;&#xA;&#x9;&#xA;&#xA;true&#xA;&#xA;&#x9;&#xA;"boolean": true&#xA;&#xA;&#xA;&#xA;field&#xA;&#xA;&#x9;&#xA;&#xA;{ "nested": "nested value" }&#xA;&#xA;&#x9;&#xA;"field": {&#xA;   "nested": "nested value"&#xA;}

  3. Click Done.

- To edit a field:

  1. Click the Pencil icon ([icon: pencil-alt, set=fa]).

  2. Update the Key and Value as when adding fields.

- To remove a field, click the Delete icon ([icon: trash, set=fa]).When finished, click Save to keep your settings. |
| Session Properties | The session properties to add.	Session property details are only added to the JSON response if the session property exists in Advanced Identity Cloud and it's available in the authenticated session.You can find a list of the default session properties in [Configure webhooks](https://docs.pingidentity.com/pingoneaic/am-authentication/auth-tree-webhooks.html#session-properties).- To add a session property:

  1. Click [icon: plus, set=fa]Add in the Session Properties modal.

  2. Enter the field name to display in the Key field and the session property name in the Value field.

  3. Click Done.

- To edit a property:

  1. Click the Pencil icon ([icon: pencil-alt, set=fa]).

  2. Update the Key and Value as when adding properties.

- To remove a property, click the Delete icon ([icon: trash, set=fa]).When finished, click Save to keep your settings.                                                                                                                                                                                                   |
| Response Headers   | The response headers to set.- To add a response header:

  1. Click [icon: plus, set=fa]Add in the Response Headers modal.

  2. Enter the HTTP header name to display in the Key field and the corresponding value to display in the Value field.

  3. Click Done.

- To edit a response header:

  1. Click the Pencil icon ([icon: pencil-alt, set=fa]).

  2. Update the Key and Value as when adding headers.

- To remove a response header, click the Delete icon ([icon: trash, set=fa]).When finished, click Save to keep your settings.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |

## Outputs

This node doesn't change the shared state.

## Callbacks

This node doesn't send any callbacks.

## Outcomes

Single outcome path: when the journey completes successfully, this node adds the additional configured details to the JSON response.

## Errors

This node doesn't log any error or warning messages of its own.
