Azure / Azure/AzureAD-BYOA-Provisioning-Samples

Operations":[{"op":"add" fails but "Add" works fine for PATCH groups

Open
#24 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
21
Forks
23
PR merge metrics
No merged PRs in 30d

Description

It's sort of crazy but I've just figured Microsoft.SystemForCrossDomainIdentityManagement is case sensitive regarding the PATCH operations and it surprisingly (well not anymore!) it is implementing the wrong case!

Based on [SCIM protocol specification](https://tools.ietf.org/html/rfc7644#page-32) a PATCH can be like this:
```
{ "schemas":
["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations":[
{
"op":"**add**",
"path":"members",
"value":[
{
"display": "Babs Jensen",
"$ref":
"https://example.com/v2/Users/2819c223...413861904646",
"value": "2819c223-7f76-453a-919d-413861904646"
}
]
},
... + additional operations if needed ...
]
}
```

After implementing the solution, we have tested it with Azure AD and received the call as something like this:
`{"schemas":["urn:ietf:params:scim:api:messages:2.0:PatchOp"],"Operations":[{"op":"Add","path":"members","value":[{"$ref":null,"value":"636823803314257913"}]}]}`

Then we have tested the system OneLogin and it saw that it failed when Patching the groups!
Further investigation showed that the reason for the failure is that they call us like

`{"schemas":["urn:ietf:params:scim:api:messages:2.0:PatchOp"],"Operations":[{"op":"add","path":"members","value":[{"$ref":null,"value":"636823803314257913"}]}]}`

Which is exactly as the protocol says!
But then it fails in the library without even reaching to our code!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.