SCIMReferenceCode
SCIMReferenceCode copied to clipboard
Non-compliant PATCH calls
Your test suite tries to PATCH a group with the following call:
PATCH http://{{Server}}{{Port}}/{{Api}}/Groups/{{groupid}}
{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:PatchOp"
],
"Operations": [
{
"name": "addMember",
"op": "add",
"path": "members",
"value": [
{
"displayName":"new User",
"value":"{{id4}}"
}
]
}
]
}
However, it seems that 'displayName' should be 'display' as per https://tools.ietf.org/html/rfc7644.
This causes my endpoint to seemingly correctly output:
{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:Error"
],
"status": 400,
"scimType": "invalidPath",
"detail": "invalidPath: no attribute named 'displayName' from 'members'"
}
Which in turn causes a subsequent test to fail as the user is not a member of that group.
Can you confirm this is an error, and should I open a pull request to fix?
Thanks!
I can confirm this. There also seem to be a whole host of problems with the implementation.
- The
MemberBasetype does not include theDisplayattribute. - The
OperationValuetype does not include theDisplayattribute either, meaning that even if it is passed during a patch operation, it is not updated inMember/MemberBase. - And this bit in
ProtocolExtensionsneeds to be updated as well to mapDisplayfromOperationValuetoMemberBase. https://github.com/AzureAD/SCIMReferenceCode/blob/12f21fbe90a09cc7acf8f834da73f482e3af9a34/Microsoft.SystemForCrossDomainIdentityManagement/Protocol/ProtocolExtensions.cs#L163-L167
On top of that, it seems $ref is also completely missing.