# Why unable to unmarshal SAMLAttribute for patch operation?

**URL:** <https://devforum.okta.com/t/why-unable-to-unmarshal-samlattribute-for-patch-operation/21374>\
**Category:** SAML\
**Created:** [July 26, 2022, 9:12am UTC](https://devforum.okta.com/t/why-unable-to-unmarshal-samlattribute-for-patch-operation/21374 "2022-07-26T09:12:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nanananaoto](https://avatars.discourse-cdn.com/v4/letter/n/b9bd4f/32.png) [@nanananaoto](https://devforum.okta.com/u/nanananaoto)\
**Post date:** [July 26, 2022, 9:12am UTC](https://devforum.okta.com/t/why-unable-to-unmarshal-samlattribute-for-patch-operation/21374/1 "2022-07-26T09:12:25Z")

</div>

## SAML Inline Hook Response

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

```

## System Log

```auto
Failure processing inline hook response
failure: Unable to unmarshal SAMLAttribute for patch operation(op=add, path=/claims/extPatientId)

```

---

<div class="post-metadata">

**Author:** ![nanananaoto](https://avatars.discourse-cdn.com/v4/letter/n/b9bd4f/32.png) [@nanananaoto](https://devforum.okta.com/u/nanananaoto)\
**Post date:** [July 26, 2022, 9:38am UTC](https://devforum.okta.com/t/why-unable-to-unmarshal-samlattribute-for-patch-operation/21374/2 "2022-07-26T09:38:31Z")

</div>

Self resolved. 😅

```diff
                         "attributes": {
                             "NameFormat": "urn:oasis:names:tc:SAML:2.0:attrname-format:basic"
                         },
- "attributeValues": {
+ "attributeValues": [
                             "attributes": {
                                 "xsi:type": "xs:string"
                             },
                             "value": "4321"
- }
+ ]
                     }
                 }
             ]

```

---

<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:** [February 13, 2024, 4:43pm UTC](https://devforum.okta.com/t/why-unable-to-unmarshal-samlattribute-for-patch-operation/21374/3 "2024-02-13T16:43:39Z")

</div>

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