---
title: State Metadata node
description: Returns selected attributes from the shared node state as metadata.
component: auth-node-ref
version: 7.4
page_id: auth-node-ref::state-metadata
canonical_url: https://docs.pingidentity.com/auth-node-ref/latest/state-metadata.html
llms_txt: https://docs.pingidentity.com/auth-node-ref/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
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:
  compatibility: Compatibility
  outcomes: Outcomes
  properties: Properties
---

# State Metadata node

Returns selected attributes from the shared node state as metadata.

This node sends a `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:

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

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)

## Compatibility

| Product                                    | Compatible?           |
| ------------------------------------------ | --------------------- |
| PingOne Advanced Identity Cloud            | [icon: check, set=fa] |
| ForgeRock Access Management (self-managed) | [icon: check, set=fa] |
| Ping Identity Platform (self-managed)      | [icon: check, set=fa] |

## Outcomes

Single outcome path.

Evaluation continues after the callback.

## Properties

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