SAML Assertion Inline Hook - Unsupported Command

Hi,

I am trying to setup a SAML Assertion Inline Hook and sending the following response from the external webservice to Okta but the hook is getting failed with the error message “Unsupported Command”. May I know what is the correct response for adding a new attribute into the SAML assertion . Thanks

{
“commands”: [
{
“op”: “add”,
“path”: “/claims/testattribute”,
“value”: {
“attributes”: {
“NameFormat”: “urn:oasis:names:tc:SAML:2.0:attrname-format:basic”
},
“attributeValues”: [
{
“attributes”: {
“xsi:type”: “xs:string”
},
“value”: “testvalue”
}
]
}
}
]
}
]
}

Do you need the type and value branches before “op”:

 {
            "type": "com.okta.assertion.patch",
            "value": [

Following @Govner’s reply, here is an example of a correct response to add a claim “test” with the value “test”.

{
    "commands": [
        {
            "type": "com.okta.assertion.patch",
            "value": [
                {
                    "op": "add",
                    "path": "/claims/test",
                    "value": {
                        "attributes": {
                            "NameFormat": "urn:oasis:names:tc:SAML:2.0:attrname-format:basic"
                        },
                        "attributeValues": [
                            {
                                "attributes": {
                                    "xsi:type": "xs:string"
                                },
                                "value": "test"
                            }
                        ]
                    }
                }
            ]
        }
    ]
}

Thanks for your response. It worked !!

Hello how would that work for an Array attribute?

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.