Skip to content

Remove users from organizations

Remove users from organizations through dashboard management and API while maintaining security and compliance

As your application grows and teams evolve, your administrators will need to manage user access when employees leave, change roles, or when administrators need to revoke access for security reasons. Proper user removal ensures that access control remains accurate, licenses are managed efficiently, and security is maintained across your organization.

When a user is removed from an organization, they immediately lose access to that organization’s resources. The user’s account remains in Scalekit, but their membership status changes, and they can no longer access organization-specific data or features.

  • User loses access to ONE specific organization
  • User account remains in Scalekit
  • User can still access OTHER organizations they belong to
  • Reversible - user can be re-added later
Remove users from organizations
// Use case: Remove user during offboarding workflow triggered by HR system
await scalekit.users.deleteMembership({
organizationId: 'org_12345',
userId: 'usr_67890'
})

The membership is removed, effectively dropping the user’s access to the specified organization.

{
"user": {
6 collapsed lines
"id": "usr_96194455173857548",
"environment_id": "env_58345499215790610",
"create_time": "2025-10-25T14:46:03.300Z",
"update_time": "2025-10-31T11:33:31.639425Z",
"email": "saifshine7+locksmith@gmail.com",
"external_id": "hitman",
"memberships": [
{
"organization_id": "org_96194455157080332",
"membership_status": "ACTIVE",
"roles": [
{
"id": "role_69229687729029148",
"name": "admin",
"display_name": "Admin"
}
],
"name": "",
"metadata": {},
"display_name": ""
},
{
"organization_id": "org_67609586521080405",
"membership_status": "PENDING_INVITE",
"roles": [
{
"id": "role_69229700009951260",
"name": "member",
"display_name": "Member"
}
],
"name": "Megasoft Inc",
"metadata": {},
"display_name": "Megasoft Inc",
"created_at": "2025-10-31T12:38:42.270Z",
"expires_at": "2025-11-15T12:38:42.231316Z"
}
],
"user_profile": {
9 collapsed lines
"id": "usp_96194455173923084",
"first_name": "Saif",
"last_name": "Shines",
"name": "",
"locale": "",
"email_verified": true,
"phone_number": "80384873",
"metadata": {},
"custom_attributes": {}
},
"metadata": {}
}
}

User removal from an organization involves several important considerations and behaviors.

  • When a user is removed from an organization and has no other organizational memberships, Scalekit will automatically delete their user account.
  • Your application is responsible for handling the transfer or deletion of the user’s resources when they are removed from an organization.
  • Scalekit immediately terminates the user’s active session upon removal from an organization.
  • Removing a user from one organization does not impact their memberships in other organizations.
  • When a user is removed from an organization, that organization will be automatically removed from the user’s organization switcher options.

When organizations use enterprise directory providers with SCIM provisioning, users are automatically removed from Scalekit organizations when they’re deprovisioned in the source directory. This ensures consistent access control across all systems without requiring manual intervention.

When a user is removed from your enterprise directory provider (such as Okta, Azure AD, or JumpCloud):

  1. The directory provider sends a SCIM DELETE request to Scalekit
  2. Scalekit automatically removes the user’s membership from the organization by marking the memberships.membership_status as INACTIVE
  3. The user immediately loses access to organization resources
  4. Your application receives webhook notifications about the membership change

This automation is particularly valuable for enterprise customers who manage large numbers of users and need to ensure that license allocation and access control remain synchronized with their directory provider.

Use the Scalekit dashboard when administrators need to manually remove users for compliance, security, support or administrative purposes. This approach provides direct control and visibility into the removal process, making it ideal for situations requiring manual oversight.

  1. Sign in to the Scalekit dashboard and navigate to Dashboard > Organizations. Select the organization from which you want to remove users.

  2. Click on the Users tab to view all organization members. Locate the user you want to remove from the user list. You can use the search functionality to quickly find specific users by name or email.

  3. Click the Actions menu (three dots) next to the user’s name and select Remove from organization. A confirmation dialog will appear to prevent accidental removals.

  4. Review the confirmation dialog to ensure you’re removing the correct user. Click Remove user to confirm. The user will immediately lose access to the organization and its resources.