-
-
Notifications
You must be signed in to change notification settings - Fork 13
Description
When EntraID sends the following Patch Request:
{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:PatchOp"
],
"Operations": [
{
"op": "Replace",
"path": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:organization",
"value": "COMPANY1"
}
]
}the result is:
{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:Error"
],
"status": "400",
"scimType": "invalidPath",
"detail": "Invalid attribute path 'urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:organization' in supplied value for 'replace' op of operation 2 in PatchOp request body"
}Expected Behavior
The Patch-Request should replace the organization property without exception.
Actual Behavior
On internal debugging of the #replace Function in scimmy I see that first the property "organization" is removed then added. The removal of the property is successfull. The target has no longer an "organization"-Property.
It assigns a "undefined" to it.
Within the #add Function it throws an exception while assign the new value:
"Cannot add property organization, object is not extensible"
This is the line where the Exception is thrown:
return (this[extension.id] = Object.assign(this[extension.id] ?? {}, data));
Steps To Reproduce
Send a PATCH - Request to scimmy with an registered urn:ietf:params:scim:schemas:extension:enterprise:2.0:User
for an already existing user with an organization.