5

We are sending PATCH request to a server in SCIM specification.

As per the SCIM specifications, the request should contain following attributes in PATCH request.

  • op
  • path
  • value

So if we are changing the 'givenName' attribute from core schema then the PATCH request will be in following way, (ref: https://www.rfc-editor.org/rfc/rfc7644#section-3.5.2)

{
 "schemas" : ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
     "Operations":[
       {
        "op":"replace",
        "path":"name.givenName",
        "value":"Ravindra"
       }
     ]
}

Now what should be the 'path' attribute if are modifying any SCIM extension, let's say enterprise extension.

Is the following representation is correct for enterprise extension?

{
 "schemas" : ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
     "Operations":[
       {
        "op":"replace",
        "path":"urn:ietf:params:scim:schemas:extension:enterprise:2.0:user.department",
        "value":"Engineering"
       }
     ]
}
Community
  • 1
  • 1
Ravi
  • 124
  • 3
  • 12
  • can we also do it like below ` "Operations":[ { "op":"replace", "path":"urn:ietf:params:scim:schemas:extension:enterprise:2.0:user", "value":{"department":"Engineering"} } ] ` Like I also happen to have similar requirement but want your help – kakabali Apr 17 '19 at 16:11

3 Answers3

2

As in the ABNF to which scim filters should adhere (see section 3.4.2.2 of RFC 7644), when you refer to an attribute part of an extension you should do URI:attribute_path, so in your case this is "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:department"

Jose
  • 36
  • 2
0

I was getting a similar error when attempting to PATCH the "active" value of an enterprise user. The solution is simple: change your "path" value in the example above to simply "department".

For completeness, here's the PATCH body that worked for me in Postman:

{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:PatchOp"
  ],
  "Operations": [
     {
       "op":"replace",
       "path":"active",
       "value":"false"
     }
  ]
}
bmontalvo
  • 19
  • 2
0

Attribute '.Operations.[].value' must be of type hash

{
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:User"
  ],
  "Operations": [
    {
      "op": "replace",
      "value": {
        "active": false
      }
    }
  ]
}

Hope this will work!!