← Yuhang Lian

SCIM · Debugging · · 3 min read

The day Entra said “False”

Deactivations from Microsoft Entra ID were silently ignored. Two small assumptions in our code, and a third layer we didn't control.

By Yuhang Lian, software engineer in Dublin

SCIM is how an enterprise tells our product who works there. When someone leaves, their identity provider sends a PATCH that sets active to false, and we deactivate the user. After we launched SCIM provisioning, deactivations from some Entra ID tenants never took effect.

What arrived

Entra ID has an older SCIM mode, used by apps created before Microsoft's 2020 compliance fixes, and in that mode the request looks slightly different:

// what the old Entra mode sends
{ "op": "Replace", "path": "active", "value": "False" }

// what our classifier expected
{ "op": "replace", "path": "active", "value": false }

The operation is capitalised, and the boolean is a string. Our classifier compared the operation exactly and expected a real boolean, so the change fell through to a generic profile update that did nothing useful. Either difference alone was enough to drop the deactivation.

The fix was one layer up

We fixed both in our handler: operation names are case-insensitive, as the SCIM spec says, and "True" and "False" count as booleans. But Auth0, which hosts the SCIM API in front of us, only accepts real booleans and drops the string before we ever see it. So the lasting fix moved upstream: the SCIM URL we give Entra customers now includes Microsoft's aadOptscim062020 flag, which makes Entra send standard requests. The IdP picker made that possible: once an admin says they use Entra, we can hand them the right URL.

What I took from it

  • Test against real payloads from every identity provider, not the examples in the spec.
  • Find out which layer actually sees the request before you fix the one you own.
  • A request that matches nothing should be loud. A silent no-op looks exactly like success.