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>
- API Access Management
- OpenID Connect/OAuth application
- Token Inline Hook
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.
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"
}
]
}
]
}
