Patch CREATE Provisioning Policy

Hello,

I am attempting to add an attribute to a provisioning policy with the usage type CREATE by using the end-point /beta/sources/{sourceid}/provisioning-policies/CREATE. I am receiving error 400.1 currently. I have made sure to change the content-type header to application/json-patch+json. My patch body is as follows:

{

"operations": [

    {

        "op": "add",

        "path": "/fields",

        "value":{

            "name": "extensionAttribute4",

            "transform": {

                "attributes": {

                    "name": "office"

                },

                "type": "identityAttribute"

            },

            "attributes": {},

            "isRequired": false,

            "type": "string",

            "isMultiValued": false

        }

    }

]

}

For the “path” field, I’ve also tried to use " /fields/- " with no success.

Not sure if this is error on my part or some type of bug.

Thanks!

Nick

Can you try this PATCH body?

[
    {
        "op": "add",
        "path": "/fields/0",
        "value": {
            "name": "extensionAttribute4",
            "transform": {
                "attributes": {
                    "name": "office"
                },
                "type": "identityAttribute"
            },
            "attributes": {},
            "isRequired": false,
            "type": "string",
            "isMultiValued": false
        }
    }
]

Since fields is an array, you need to reference it as such in your body.

This worked, thank you!

1 Like