> For the complete documentation index, see [llms.txt](https://docs.corppass.gov.sg/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.corppass.gov.sg/technical-specifications/corppass-authorization-api-fapi-2.0/integration-guide/4.-userinfo-endpoint/third-party-auth-info.md).

# Third-party Auth Info

The `tp_auth_info` claim provides **third-party authorization details** about the **user acting on behalf of the entity**.

{% hint style="info" %}
This claim is only returned in the [Userinfo Endpoint](/technical-specifications/corppass-authorization-api-fapi-2.0/integration-guide/4.-userinfo-endpoint.md) response when

1. **`tpauthinfo`** scope is requested.
2. The digital service **supports third-party** functionality on Corppass.
3. The user has **third-party authorisations** for the digital service.
   {% endhint %}

{% hint style="info" %}
**Note:** A user may have multiple third-party authorizations for a given Digital Service.

*Example:* For the GST Digital Service, a user from a third-party firm is authorized to file GST on behalf of 5 client entities. In this case, all 5 third-party authorizations will be returned in the `tp_auth_info` claim.
{% endhint %}

## `tp_auth_info` **Attributes**

<table data-full-width="true"><thead><tr><th width="184.78125">Field</th><th width="149.86328125">Data Type</th><th width="99.79296875">Length</th><th>Description</th></tr></thead><tbody><tr><td><code>Result_Set</code></td><td>JSON</td><td>-</td><td>Digital Service authorization result set.</td></tr></tbody></table>

#### `tp_auth_info.Result_Set` attributes

<table data-full-width="true"><thead><tr><th width="184.8515625">Field</th><th width="149.8828125">Data Type</th><th width="100.21875">Length</th><th>Description</th></tr></thead><tbody><tr><td><code>ESrvc_Row_Count</code></td><td>Integer</td><td>10</td><td><p>The number of Digital Services for which the authorizations are present in the <code>Result_Set.ESrvc_Result</code> JSON object.</p><p></p><p>For third-party authorisations, this value will always be set to <code>1</code>.</p></td></tr><tr><td><code>ESrvc_Result</code></td><td>Array of JSON</td><td>-</td><td><p>Array of JSON objects, each containing third-party authorization details for the Digital Service.</p><p></p><p>For third-party authorisations, there will only be a single JSON object.</p><p></p><p>Refer to <a href="#e-service-item-attributes-tp_auth_info.result_set.esrvc_result-item">E-Service item attributes</a> for more details.</p></td></tr></tbody></table>

#### E-Service item attributes (`tp_auth_info.Result_Set.ESrvc_Result[]` item)

Contains authorization details for the digital service.

<table data-full-width="true"><thead><tr><th width="179.8515625">Field</th><th width="150.265625">Data Type</th><th width="99.93359375">Length</th><th>Description</th></tr></thead><tbody><tr><td><code>CPESrvcID</code></td><td>String</td><td>25</td><td>The readable ID of the Digital Service.</td></tr><tr><td><code>Auth_Set</code></td><td>JSON</td><td>-</td><td><p>JSON object. Contains third-party assignment details for the Digital Service.</p><p></p><p>Refer to <a href="#third-party-assignment-result-set-attributes-tp_auth_info.result_set.esrvc_result-.auth_set">Third-Party Assignment Result Set attributes</a> for more details.</p></td></tr></tbody></table>

#### Third-Party Assignment Result Set attributes (`tp_auth_info.Result_Set.ESrvc_Result[].Auth_Set`)

<table data-full-width="true"><thead><tr><th width="180.28515625">Field</th><th width="150.21484375">Data Type</th><th width="99.8359375">Length</th><th>Description</th></tr></thead><tbody><tr><td><code>ENT_ROW_COUNT</code></td><td>Integer</td><td>10</td><td>Indicates the number of rows in the third-party assignment.<br><br>This is equal to the number of client entities that the user is authorized as third party for that Digital Service.</td></tr><tr><td><code>TP_Auth</code></td><td>Array of JSON</td><td>-</td><td><p>Array of JSON objects, each JSON object represents an third-party authorization of the user for the client entity.</p><p></p><p>Refer to <a href="#third-party-assignment-item-attributes-tp_auth_info.result_set.esrvc_result-.auth_set.tp_auth-item">Third-Party Assignment Item attributes</a> for more details.</p></td></tr></tbody></table>

#### Third-Party Assignment Item attributes (`tp_auth_info.Result_Set.ESrvc_Result[].Auth_Set.TP_Auth[]` item)

<table data-full-width="true"><thead><tr><th width="180.0625">Field</th><th width="149.625">Data Type</th><th width="100.125">Length</th><th>Description</th></tr></thead><tbody><tr><td><code>CP_Clnt_ID</code></td><td>String</td><td>10</td><td>Client entity ID (eg. UEN).</td></tr><tr><td><code>CP_ClntEnt_TYPE</code></td><td>String</td><td>10</td><td><p></p><p>Client entity type. The possible values for entity type are:</p><ul><li>UEN</li><li>NON-UEN (Includes non-UEN entities as well as ASGD/ITR entities)</li><li>GSTN</li></ul></td></tr><tr><td><code>Auth_Result_Set</code></td><td>Array of JSON</td><td>-</td><td><p>JSON object. Contains third-party user assignment details for the client entity.</p><p></p><p>Refer to <a href="#user-assignment-result-set-attributes-tp_auth_info.result_set.esrvc_result-.auth_set.tp_auth-.auth_r">User Assignment Result Set attributes</a> for more details.</p></td></tr></tbody></table>

#### User Assignment Result Set attributes (`tp_auth_info.Result_Set.ESrvc_Result[].Auth_Set.TP_Auth[].Auth_Result_Set`)

<table data-full-width="true"><thead><tr><th width="180.28515625">Field</th><th width="150.21484375">Data Type</th><th width="99.8359375">Length</th><th>Description</th></tr></thead><tbody><tr><td><code>Row_Count</code></td><td>Integer</td><td>10</td><td><p>The count of the number of rows included in the result set (ie. number of third-party assignments the user has for the given client entity).</p><p></p><p>E.g. If the user is granted two separate third-party assignments to the same e-service on behalf of the same entity, this value will be <code>2</code> . The following result set will contain then contain two objects, each representing one assignment.</p></td></tr><tr><td><code>Row</code></td><td>Array of JSON</td><td>-</td><td><p>Array of JSON objects, where each JSON object describes a single third-party assignment.</p><p></p><p>Refer to <a href="#user-assignment-item-attributes-tp_auth_info.result_set.esrvc_result-.auth_result_set.row-item">User Assignment Item attributes</a> for more details.</p></td></tr></tbody></table>

#### User Assignment Item attributes (`tp_auth_info.Result_Set.ESrvc_Result[].Auth_Set.TP_Auth[].Auth_Result_Set.Row[]` item)

<table data-full-width="true"><thead><tr><th width="180.0625">Field</th><th width="149.625">Data Type</th><th width="100.125">Length</th><th>Description</th></tr></thead><tbody><tr><td><code>CP_ClntEnt_SUB</code></td><td>String</td><td>32</td><td>Sub-UEN value of that entity to which the user is assigned the authorization. <br><br>If the Digital Service requires a mandatory Sub-UEN attribute but no value was supplied, <code>"ERROR_MISSING_VALUE"</code> will be returned for the field.</td></tr><tr><td><code>CPRole</code></td><td>String</td><td>20</td><td>The role assigned to the user in this particular authorisation.</td></tr><tr><td><code>StartDate</code></td><td>String (format YYYY-MM-DD)</td><td>10</td><td>The start date for validity of the authorisation.</td></tr><tr><td><code>EndDate</code></td><td>String (format YYYY-MM-DD)</td><td>10</td><td>The end date for validity of the authorisation.</td></tr><tr><td><code>Parameter</code></td><td>Array of JSON</td><td>-</td><td><p>This is an optional array of parameters (JSON objects containing only name and value pair attributes) defined by Digital Service administrator. <br><br>These parameters will be populated as required. These parameters use a name-value pair format.<br><br>If no parameters are defined this will be returned as empty array.<br><br>If a parameter is defined as mandatory by the Digital Service administrator but no value was supplied, <code>"ERROR_MISSING_VALUE"</code> will be returned for the field.</p><p></p><p>Refer to <a href="#user-assignment-parameter-attributes-tp_auth_info.result_set.esrvc_result-.auth_set.tp_auth-.auth_re">User Assignment Parameter attributes</a> for more details.</p></td></tr></tbody></table>

#### User Assignment Parameter attributes (`tp_auth_info.Result_Set.ESrvc_Result[].Auth_Set.TP_Auth[].Auth_Result_Set.Row[].Parameter`)

<table data-full-width="true"><thead><tr><th width="179.54296875">Field</th><th width="150.12109375">Data Type</th><th width="99.56640625">Length</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td>String</td><td>30</td><td>Parameter name defined by defined by Digital Service administrator</td></tr><tr><td><code>value</code></td><td>String</td><td>66</td><td>Parameter value defined by defined by Digital Service administrator</td></tr></tbody></table>

## Sample Payload

<details>

<summary>User with two third-party authorisations</summary>

Third-Party authorization info payload for a User with **two** third-party authorisations for the e-service `SAMPLE-ESERVICE`:

* One acting on behalf of entity `T00YY8888X`
* One acting on behalf of entity `T99BB0000A`

{% code lineNumbers="true" %}

```json
{
  "tp_auth_info": {
    "Result_Set": {
      "ESrvc_Row_Count": 1,
      "ESrvc_Result": [
        {
          "CPESrvcID": "SAMPLE-ESERVICE",
          "Auth_Set": {
            "ENT_ROW_COUNT": 2,
            "TP_Auth": [
              {
                "CP_Clnt_ID": "T00YY8888X",
                "CP_ClntEnt_TYPE": "UEN",
                "Auth_Result_Set": {
                  "Row_Count": 1,
                  "Row": [
                    {
                      "CP_ClntEnt_SUB": "",
                      "CPRole": "Maker",
                      "StartDate": "2025-09-05",
                      "EndDate": "9999-12-31",
                      "Parameter": []
                    }
                  ]
                }
              },
              {
                "CP_Clnt_ID": "T99BB0000A",
                "CP_ClntEnt_TYPE": "UEN",
                "Auth_Result_Set": {
                  "Row_Count": 1,
                  "Row": [
                    {
                      "CP_ClntEnt_SUB": "",
                      "CPRole": "Checker",
                      "StartDate": "2025-09-05",
                      "EndDate": "9999-12-31",
                      "Parameter": []
                    }
                  ]
                }
              }
            ]
          }
        }
      ]
    }
  },
}
```

{% endcode %}

</details>
