# SAML Assertion Inline Hook - Unsupported Command

**URL:** <https://devforum.okta.com/t/saml-assertion-inline-hook-unsupported-command/6463>\
**Category:** SAML\
**Created:** [October 2, 2019, 4:03am UTC](https://devforum.okta.com/t/saml-assertion-inline-hook-unsupported-command/6463 "2019-10-02T04:03:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MDD](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@MDD](https://devforum.okta.com/u/MDD)\
**Post date:** [October 2, 2019, 4:03am UTC](https://devforum.okta.com/t/saml-assertion-inline-hook-unsupported-command/6463/1 "2019-10-02T04:03:43Z")

</div>

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”  
}  
]  
}  
}  
]  
}  
]  
}

---

<div class="post-metadata">

**Author:** ![Govner](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/govner/32/1099_2.png) [@Govner](https://devforum.okta.com/u/Govner)\
**Post date:** [October 2, 2019, 6:29am UTC](https://devforum.okta.com/t/saml-assertion-inline-hook-unsupported-command/6463/2 "2019-10-02T06:29:58Z")

</div>

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

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

```

---

<div class="post-metadata">

**Author:** ![dragos](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/dragos/32/1313_2.png) [@dragos](https://devforum.okta.com/u/dragos)\
**Post date:** [October 2, 2019, 7:57am UTC](https://devforum.okta.com/t/saml-assertion-inline-hook-unsupported-command/6463/3 "2019-10-02T07:57:24Z")

</div>

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

```auto
{
    "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"
                            }
                        ]
                    }
                }
            ]
        }
    ]
}

```

---

<div class="post-metadata">

**Author:** ![MDD](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@MDD](https://devforum.okta.com/u/MDD)\
**Post date:** [October 2, 2019, 8:30am UTC](https://devforum.okta.com/t/saml-assertion-inline-hook-unsupported-command/6463/4 "2019-10-02T08:30:56Z")

</div>

Thanks for your response. It worked !!

---

<div class="post-metadata">

**Author:** ![Gisenm](https://avatars.discourse-cdn.com/v4/letter/g/ac91a4/32.png) [@Gisenm](https://devforum.okta.com/u/Gisenm)\
**Post date:** [June 4, 2020, 6:28pm UTC](https://devforum.okta.com/t/saml-assertion-inline-hook-unsupported-command/6463/5 "2020-06-04T18:28:40Z")

</div>

Hello how would that work for an Array attribute?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [January 24, 2024, 11:27pm UTC](https://devforum.okta.com/t/saml-assertion-inline-hook-unsupported-command/6463/6 "2024-01-24T23:27:33Z")

</div>

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