Offboard Principal Lifecycle
POST
/v1/admin/principal-assignments/lifecycle/offboard
const url = 'https://example.com/v1/admin/principal-assignments/lifecycle/offboard';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"tenant_id":"default","proposal_id":"example","subject_key":"example","email":"","entra_object_id":"","cleanup_after_days":30,"dry_run":false}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/admin/principal-assignments/lifecycle/offboard \ --header 'Content-Type: application/json' \ --data '{ "tenant_id": "default", "proposal_id": "example", "subject_key": "example", "email": "", "entra_object_id": "", "cleanup_after_days": 30, "dry_run": false }'Immediate employee offboarding (ADR-0009 Phase 1). Resolves the principal’s STABLE
ids from Keycloak (the identity broker — never a display name), revokes ALL group
assignments (soft, no hard delete), and enqueues the connector removals keyed by the
Entra object id. The T+30d cleanup is scheduled via the returned cleanup_due_at.
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
PrincipalOffboardIn
object
tenant_id
Tenant Id
string
proposal_id
required
Proposal Id
string
subject_key
required
Subject Key
string
email
Email
string
entra_object_id
Entra Object Id
string
cleanup_after_days
Cleanup After Days
integer
dry_run
Dry Run
boolean
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
PrincipalOffboardOut
object
subject_key
Subject Key
string
entra_object_id
Entra Object Id
string
github_user_id
Github User Id
string
keycloak_resolved
Keycloak Resolved
boolean
revoked_count
Revoked Count
integer
revoked_paths
Revoked Paths
Array<string>
cleanup_due_at
Cleanup Due At
string
offboarding_state
Offboarding State
string
dry_run
Dry Run
boolean
Example
{ "subject_key": "", "entra_object_id": "", "github_user_id": "", "keycloak_resolved": false, "revoked_count": 0, "cleanup_due_at": "", "offboarding_state": "", "dry_run": false}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}