The plane's SCIM endpoints answer a filter and take PATCH the way Microsoft Entra ID sends them, keep a user's userName beside the subject, and never move a person in a push¶
Decision 754 · accepted · 2026-10-02 · issue #340
Superseded in part
In part by 899.
- One filter, and nothing half-read.
<attribute> eq "<value>", onuserNameorexternalIdfor users anddisplayNameorexternalIdfor groups: what a provider matches on before it creates. Attribute names andeqin any case; auserNameordisplayNamecompared ignoring case, as RFC 7644 compares them, andexternalIdexactly. Anything else isinvalidFilter, since an answer to part of a filter is read as a match. userNameis kept. Where anexternalIdcomes with it, which under 751 is every Entra user, theuserNamewas nobody's subject and kept nowhere, so Entra's default match,userName eq "<their UPN>", answered nobody about a person the plane had: each change after the first push would have been a create, and a removal from scope a skip. It is a column onusers, written by a push and a PATCH and rendered asuserName, and the subject stands in for it on a row no push has named. A label, as the email is; a sign-in does not write it.- A PATCH changes what a push would, a user's
userName,externalId,displayName, email andactive, a group'sdisplayNameand members, and accepts and ignores the rest (title,name.*, the enterprise extension), as aPOSTdoes. It is read the way Entra writes one as well as the way the RFC does:opin any case, a value object without a path whose keys are paths,"False"forfalse,members[value eq "<id>"].active: falseis aDELETE, and the principals the person sponsors stop. It is applied whole or refused whole with SCIM's error body and a400(a bad op, path or value; removing what is required), never a500. - A PATCH does not make somebody else. One that would key the person on another
subject, a different
externalIdor, without one, a differentuserName, is refused asmutability: a person moves at sign-in under 751, with their sessions, and a push that moved them would leave those under the old name. A group'sexternalIdis what a groups claim names it by, and does not change either. - Members by PATCH are a change, not a list. A push carries the whole list and
replaces it; a PATCH names members and adds or removes them, read and written in one
transaction with the group's row held, so two at once do not lose one. An id nobody
has is nobody to add, as in a push. A group's PATCH answers
204, a user's the user. - Addressed by the plane's
id,GET /Users/:idand/Groups/:id, andexcludedAttributes=membersleaves a group's members out, as Entra asks for groups.DELETEon a group empties it, which the docs said and the route did not do.
Governs: apps/troupe_plane/lib/troupe/plane/identity/user.ex, apps/troupe_plane/lib/troupe/plane/scim.ex, apps/troupe_plane/lib/troupe/plane/web/router.ex, apps/troupe_plane/priv/repo/migrations/20261002000754_scim_user_name.exs