---
title: State Metadata node
description: The State Metadata node returns selected attributes from the shared node state as metadata.
component: auth-node-ref
version: latest
page_id: auth-node-ref::state-metadata
canonical_url: https://docs.pingidentity.com/auth-node-ref/latest/state-metadata.html
keywords: ["Nodes &amp; Trees", "Journeys", "Authentication", "Metadata"]
page_aliases: ["auth-node-state-metadata.adoc"]
superseded_by: https://docs.pingidentity.com/auth-node-ref/latest/state-metadata.html
section_ids:
  example: Example
  availability: Availability
  inputs: Inputs
  dependencies: Dependencies
  configuration: Configuration
  outputs: Outputs
  callbacks: Callbacks
  outcomes: Outcomes
  errors: Errors
---

# State Metadata node

The State Metadata node returns selected attributes from the shared node state as metadata.

## Example

Use this node to display custom information that includes user attributes without having to alter the existing flow.

For example, for OTP authentication with a choice of email or SMS, use this node to return the user's email address or phone number. You can use the attributes with an [OTP Collector Decision node](otp-collector-decision.html), and optionally, a [Scripted Decision node](scripted-decision.html), to customize the data for display later.

![An example of OTP authentication with a State Metadata node.](_images/trees-node-state-metadata-example-platform.png)

* The [Page node](page.html) with a [Platform Username node](platform-username.html) and [Attribute Collector node](attribute-collector.html) prompts for the credentials.

* The [Data Store Decision node](data-store-decision.html) confirms the user's credentials.

* The [Choice Collector node](choice-collector.html) lets the user opt for notification through email or a text message.

* The [OTP Email Sender node](otp-email-sender.html) sends the one-time passcode (OTP) as email.

* The [OTP SMS Sender node](otp-sms-sender.html) sends the OTP as a text message.

* The State Metadata node injects attributes for additional information.

* The [OTP Collector Decision node](otp-collector-decision.html) displays the additional information when collecting the OTP to verify.

## Availability

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

## Inputs

This node reads its configured Attributes from the shared node state.

## Dependencies

This node has no dependencies.

## Configuration

| Property   | Usage                                                                     |
| ---------- | ------------------------------------------------------------------------- |
| Attributes | Specify one or more shared state attribute names for return.Default: none |

## Outputs

This node doesn't change the shared state.

## Callbacks

The node sends a [MetadataCallback](https://docs.pingidentity.com/pingoneaic/am-authentication/callbacks-read-only.html#MetadataCallback) to retrieve shared state values, which it adds to the JSON response from the `/authenticate` endpoint. This example shows how a shared state attribute, `mail`, is returned:

```json
{
    "callbacks": [
        {
            "type": "MetadataCallback",
            "output": [
                {
                    "name": "data",
                    "value": {
                        "mail": "bjensen@example.com"
                    }
                }
            ]
        }
    ]
}
```

## Outcomes

Single outcome path.

Evaluation continues after the callback.

## Errors

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