A provisioning job can finish with HTTP 204 and a green dashboard while the learner still opens the course. SCIM deleted a User resource. The LMS still has a login, an enrolment, or a mapping to an external id. Those are different stores.

Treat the lifecycle as a state machine. Follow one dedicated test identity through create, suspend, reactivate, and delete. After each step, read three places: the identity store, the LMS user record, and a fresh authorized login.

What SCIM actually deletes

RFC 7644 (SCIM Protocol, IETF Standards Track, September 2015) gives User resources GET, POST, PUT, PATCH, and DELETE on /Users. PATCH is a partial update. DELETE is resource removal.

Section 3.6 is the important one. A successful DELETE returns 204 No Content. After that, later operations on that resource must return 404, and the resource must drop out of query results. The same section lets the service provider keep the record internally. 204 means the SCIM endpoint will treat the User as gone. It is silent about the LMS user table, enrolments, grades, files, and sessions.

RFC 7643 (Core Schema) defines active as a boolean for the user's administrative status. The service provider decides what that means. The typical example in the RFC is true for able to log in, false for suspended. That is a login flag, not a delete.

Run this on a test LMS you own. Use a synthetic identity.

Canvas: three user statuses, three outcomes

Canvas SIS CSV (users.csv) requires status. The enum is active, suspended, deleted. The field is sticky. Instructure's SIS format documentation states:

When a user is 'deleted' it will delete the login tied to the sis_id. If the login is the last one, all of the users enrollments will also be deleted and they won't be able to log in to the school's account. If you still want the student to be able to log in but just not participate, leave the student 'active' but set the enrollments to 'completed'. If you want to leave a student's enrollments intact, but not allow them to login, use the 'suspended' status.

A SCIM DELETE that the connector maps to SIS deleted removes the login and, when it is the last login, the enrolments. A mapping that sets suspended leaves enrolments in place and blocks login. Completing enrolments while leaving the user active still lets them sign in.

Diffing mode adds a fourth outcome. If the SIS feed sends the whole set each time, Canvas compares it to the last successful import with the same diffing_data_set_identifier. A user omitted from the new file is marked deleted by default. diffing_user_remove_status=suspended suspends omitted users instead. skip_deletes=true leaves removed objects alone for every object type in that import.

DELETE /api/v1/accounts/:account_id/users/:user_id is a different verb again. Canvas documents it as deleting a user record from a Canvas root account. In a multi-tenant instance it leaves other root accounts untouched.

Record which of those four paths your connector actually takes. The SCIM 204 does not pick one for you.

Moodle™: the LDAP sync is the lifecycle

Moodle™ core has no native SCIM /Users endpoint. The mass-sync path most sites run is LDAP (or another external auth plugin). Site administration → Plugins → Authentication → LDAP server has Removed ext user: what to do with the internal account when the user disappears from the external source.

The three core options are Keep internal, Suspend internal, and Full delete. MoodleDocs states that only suspended users are automatically revived if they reappear in the external source. The scheduled task is \auth_ldap\task\sync_task. It creates and updates user information, and it suspends or deletes LDAP accounts. MoodleDocs warns to confirm LDAP settings before enabling it, because a bad filter can delete the wrong people.

Keep internal leaves a login that still works after the directory entry is gone. Suspend internal blocks login and can revive on reappearance. Full delete removes the Moodle™ account. Those three outcomes sit next to SCIM's active=false and DELETE as separate verbs.

A SCIM connector in front of Moodle™ is a plugin or a middle layer. Read that connector's mapping table.

The fixture

Create one identity that exists only for this check. Example username prov-canary-001. Give it a unique SIS id / SCIM externalId / Moodle™ idnumber you will never reuse for a person. Enrol it on a throwaway course on the test LMS. Put a marker string in that course so a successful login is visible in the page body.

Walk four states. Wait for the documented job interval after each write before you read.

StepIdentity-store actionExpected SCIM readExpected LMS loginExpected enrolment
1 CreatePOST /Users or SIS status=active200, active truefresh login succeedsstudent enrolment present
2 SuspendPATCH active false, or SIS suspended200, active falsefresh login failsenrolments still there (Canvas suspended)
3 ReactivatePATCH active true, or SIS active200, active truefresh login succeedssame enrolment
4 DeleteDELETE /Users/{id} or SIS deleted404fresh login failsCanvas last-login delete also drops enrolments

On Moodle™ LDAP, substitute the Removed ext user setting you actually run. Suspend internal should fail login and revive on step 3 if the directory entry returns. Full delete should fail login and leave no row with deleted=0. Keep internal should still log in after the directory entry is gone; that is the mismatch this monitor exists to catch.

Use a fresh browser profile or a new API token for the login check. An existing session can outlive a disable. Leftover IdP sessions are a different check.

What to read after each step

SCIM (replace host, token, and id):

curl -sS -D - -o /tmp/scim-user.json \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/scim+json" \
  "$SCIM/Users/$ID"

Expect 200 with "active": true or "active": false on create/suspend/reactivate. Expect 404 after delete.

Canvas user + enrolments:

AUTH="Authorization: Bearer $CANVAS_TOKEN"

curl -sS -D - -o /tmp/canvas-user.json \
  -H "$AUTH" \
  "$CANVAS/api/v1/users/sis_user_id:$SISID"

curl -sS -D - -o /tmp/canvas-enroll.json \
  -H "$AUTH" \
  "$CANVAS/api/v1/users/sis_user_id:$SISID/enrollments"

Moodle™: query mdl_user for username, suspended, deleted, auth, and timemodified. Then log in as the canary and search the course HTML for the marker.

Write one row per run:

FieldAfter createAfter suspendAfter reactivateAfter delete
Time of write
Time of read
SCIM HTTP status / active
LMS suspended / deleted / SIS status
Fresh login
Enrolment present
Delay (read − write)

When to alert

Define an acceptable propagation delay from the connector's own docs or from a week of measured runs. Alert when the delay is exceeded and:

  • SCIM is 404 or active is false, and a fresh login still reaches the marker.
  • SCIM is 200 with active true, and the LMS user is suspended or deleted.
  • Canvas SIS deleted ran, the login is gone, and an enrolment for that sis_id is still active.
  • Moodle™ Removed ext user is Suspend internal, the directory entry is back, and the account stayed on nologin past the next \auth_ldap\task\sync_task.
  • The SCIM externalId / SIS id now points at a different LMS user id than last week.

Stale external-id mappings show up on step 1 of the next cycle: POST creates a second LMS user, or PUT updates the wrong one.

Retries belong in the delay budget. A 409 on recreate after DELETE is a conflict in the LMS even when SCIM §3.6 says the provider should ignore the deleted resource in conflict calculation.

What this monitor is

This is provisioning correctness. It answers one question: after the identity store moved this test user to a new state, does the LMS user, the enrolment, and a fresh login match that state, within the delay you accepted.

It is a different check from an open SSO session after logout, from a canary course authorization fixture, and from a weekly tool inventory.

Disclosure: I work on GuardLMS, a product of Ldesign Media. The status enums, HTTP codes, and admin paths above are from RFC 7643, RFC 7644, Instructure's SIS CSV documentation, the Canvas Accounts API, and MoodleDocs LDAP authentication.