---
title: "corestack_external_db_user_remove"
url: https://docs.corefinity.com/mcp/tools/corestack_external_db_user_remove
type: tool
last_updated: 2026-11-13
feature: database
related:
  - https://docs.corefinity.com/api/reference/database/delete-site-database-user.md
  - https://docs.corefinity.com/guides/sites/database/database-users.md
---
# corestack_external_db_user_remove

**Remove a database user.** Remove a database user: it can no longer sign in, and its open sessions are closed. This cannot be undone. Scope: write. Long-running: answers with a task.

- Scope: `write`
- Runs as a task: yes

## When to use it

Remove a database user the person no longer needs. It can no longer sign in from the moment the change applies, and its open sessions are closed. This cannot be undone: add a new user to give access again.

Removing the last external user leaves external access, and its monthly charge, on: turn it off with corestack_external_db_disable to stop it. `application`, the site's own login, is never removed here.

## Inputs

- `site_id` (integer, ≥ 1, required)
- `username` (string, required): the user's name from corestack_external_db_get.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "site_id": {
      "minimum": 1,
      "type": "integer"
    },
    "username": {
      "maxLength": 128,
      "minLength": 1,
      "type": "string"
    }
  },
  "required": [
    "site_id",
    "username"
  ],
  "type": "object"
}
```

## Refusals

- `user_not_found`: no user of that name on this environment that can be removed here.
- `busy`: another change to this environment is applying.
- `deleted`: the site is deleted (in its grace period).
- `provisioning`: the site is still being created.
- `managed_elsewhere` (message: "This site is managed by another control panel"): another control panel manages this site, so use that control panel for it. This is refused before anything else about the site, as in the Control Panel and the API. Nothing was done.
- The refusals every tool can answer: `invalid_arguments`, `tenant_mismatch`, `scope_required`, `pin_refused`, `rate_limited`, `temporarily_unavailable`, `internal_error` (corestack://guides/how-this-server-works).

## Example

```json
{
  "name": "corestack_external_db_user_remove",
  "arguments": {
    "site_id": 4211,
    "username": "bi_reports"
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_external_db_user_remove with site_id 4211, username bi_reports. (Remove a database user.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [DELETE /api/corestack/sites/{site}/database/users/{username}](https://docs.corefinity.com/api/reference/database/delete-site-database-user.md)
- Guide: [Database users](https://docs.corefinity.com/guides/sites/database/database-users.md)
