---
schema_version: "1"
id: 218562c01d3102bd2bece7b40193e1bad45fdf0babb4718d6a807d46c1e406ad
title: Get User Data from JSON String Action
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/flow_ref_elements_actions_get_user_data_json.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_actions_get_user_data_json.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 4868576f9fd8427df77a80da3d2c8b874616588a3b87e19daade802421f809c5
description: Retrieve the value of a specific attribute from a JSON object that has been serialized into a string. Use this action to retrieve user information from the user info response or ID token during authentication provider user registration flows. Then, create and update user records with the user information that you retrieved from this action.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Get User Data from JSON String Action

Retrieve the value of a specific attribute from a JSON object that has been serialized into a string. Use this action to retrieve user information from the user info response or ID token during authentication provider user registration flows. Then, create and update user records with the user information that you retrieved from this action.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">View supported editions.</a></td></tr></tbody></table>

This action is available only for the Identity User Registration Flow type.

In Flow Builder, add an Action element to your flow. In the Action field, enter Get, and then select **Get User Data from JSON String**.

## Set Input Values

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:24%">
          <col style="width:76%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d145589e77">Input Parameter</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d145589e80">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Input Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d145589e77 ">
              <strong class="uicontrol">JSON Object String</strong>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d145589e80 ">
              <p>A JSON object that represents a map of attributes and that has been serialized into a
                string.</p>
              <p>In authentication provider user registration flows, to pass in the user info
                response or ID token, first create an Apex-defined variable for the
                <code>Auth.UserData</code> object. For the input parameter, specify one of these
                properties from the <code>Auth.UserData</code> object.
              </p>
              <ul>
                <li><code>idTokenJSONString</code></li>

                <li><code>userInfoJSONString</code></li>

              </ul>
            </td>

          </tr>
          <tr class="">
            <td data-label="Input Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d145589e77 ">
              <strong class="uicontrol">JSON Attribute Key</strong>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d145589e80 ">
              <p>A key that contains the full JSON variable path for a specific attribute from the JSON
                object. </p>
              <p>For example, to get the value of the first <code>type</code> claim in this
                JSON structure, use the JSON variable path <code>$.location[0].type</code> as the
                key.</p>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>{"location": [ { "type": "office", "city": "San Francisco"}, {"type": "home", "city":"New York"}]}</code></pre>
            </td>

          </tr>
        </tbody>
      </table>

## Store Output Values

Each action returns a single attribute. To rename the output so that it’s easier for you to use it in the flow, assign the output to a variable. For example, if you retrieve an attribute that stores a single sign-on identifier from the provider, store it in a new federationIdentifier variable. Reference the variable when you create and update user records.

 
| Input Parameter | Description |
| --- | --- |
| **Attribute Value** | The value for the attribute that was specified in the JSON attribute key. The value is stored in an instance of the `Auth.JsonValueOutput` class in a property that corresponds to the value type. For example, if the retrieved value is an integer, it’s stored in the `integerValue` property. |