Sign members out
On this page
One call ends every sign-in session a member holds in Strata. Use it from an identity or security tool: when someone leaves the company, when an account may be compromised, or whenever a member should sign in again before going on.
It does what signing a user out does on Organization › Active sessions, from a key instead of a person: the member's sessions end at once, on every server Strata runs, and the next thing they do asks them to sign in. Nothing they made is touched, and their extension connections stay as they are.
#The scope
| Scope | What it allows | Who can grant it |
|---|---|---|
sessions:revoke | DELETE /v1/users/:userId/sessions, below | An admin with Revoke sessions |
Grant it on a key of its own, shown on the API Keys page as Sign members out. An admin without Revoke sessions cannot mint or update a key with this scope: Strata answers 403 with the code SESSIONS_SCOPE_REQUIRES_PERMISSION, so a key never does what the admin who made it could not.
#End a member's sessions
DELETE /v1/users/:userId/sessions
Authorization: Bearer <key>userId is the member's id, as GET /v1/compliance/users lists them (see Compliance API).
{ "revoked": true, "user_id": "4f7c1e6a-2b8d-4c39-9a1e-5d6f7a8b9c0d", "revoked_count": 2 }revoked_count is how many sessions ended; 0 when the member held none, which is still a success.
| Status | When |
|---|---|
200 | The member's sessions ended. |
403 insufficient_scope | The key does not hold sessions:revoke. |
404 not_found | No such member in the key's organization. A member of another organization gets the same answer. |
405 | Any method but DELETE on this path. |
Every call is recorded in the audit trail as session.revoked, with the member, the number of sessions, and the key named as the actor.