<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
Token Inline Hook Execution Failed with Error "Could not deserialize inline hook response"
API Access Management
Okta Classic Engine
Okta Identity Engine
Overview

An error is logged in the System Log for a Token Inline Hook execution with the following error summary: 

 

Could not deserialize inline hook response due to error at Line 1 Column <number>

 

Applies To
Cause

If the Could not deserialize inline hook response error is received when Okta attempts to execute a Token Inline Hook configured on a Custom Authorization server, the most likely cause is that there is a syntax error in the hook's response back to Okta.

Solution

Ensure that the hook response is properly formatted JSON, with a list of commands returned, where each command in the list is an object containing both a "type" of command (either com.okta.identity.patch or com.okta.access.patch) and a list of "value", where each object in that list represents a specific operation to be performed on the specified token "type", with an "op", "path" to /claims/{{claimName}} or /token/lifetime/expiration and a "value" (that this claim/lifetime will be set to).

See example below:

{
  "commands": [
    {
      "type": "com.okta.identity.patch",
      "value": [
        {
          "op": "add",
          "path": "/claims/extPatientId",
          "value": "1234"
        }
      ]
    },
    {
      "type": "com.okta.access.patch",
      "value": [
        {
          "op": "add",
          "path": "/claims/external_guid",
          "value": "F0384685-F87D-474B-848D-2058AC5655A7"
        }
      ]
    }
  ]
}

 

Loading
Token Inline Hook Execution Failed with Error "Could not deserialize inline hook response"