SCIM Improper schema error with PATCH
Hello,
I am doing first tests with the Salesforce SCIM API (which isn't documented that great, unfortunately). I got the basic GET calls running, but when i try to modify a user i get an "Improper Schema" error.
Any idea what could be wrong?
PATCH https://{orgurl}/services/scim/v2/Users/{id}
Body:
{
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User",
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
],
"userName": "insightssecurity@00d1t0000001za8eaa.com",
"alias": "test"
}
Response:
{
"schemas": "[\"urn:ietf:params:scim:api:messages:2.0:Error\"]",
"detail": "Improper Schema.",
"status": 400
}
Note that, when using PUT, a slightly augmented version of the request (added some fields that the server regards as required) works but the same body fails when used in PATCH.
{
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User",
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
],
"userName": "insightssecurity@00d1t0000001za8eaa.com",
"displayName": "Security User",
"name": {
"formatted": "Security User",
"familyName": "User",
"givenName": "Security"
},
"alias": "Test",
"active":true,
"emails": [
{
"type": "work",
"primary": true,
"value": "insightssecurity@example.com"
}
],
"entitlements": [
{
"value": "00e1t000000FPtnAAG",
"$ref": "/Entitlements/00e1t000000FPtnAAG",
"display": "Analytics Cloud Security User",
"type": "Profile",
"primary": true
}
]
}
Thanks
Thomas