# organization_not_empty

<!-- Generated by scripts/generate.ts. Do not edit. -->

<!-- Source: core commit `f70874a3916ad5b24a8619246cbae6cc8bc24d27`. -->

<div data-pagefind-ignore>

Since API version `1.0`.

| Field     | Value      |
| --------- | ---------- |
| Type      | `conflict` |
| Status    | 409        |
| Surfaces  | `api`      |
| Retryable | No         |

</div>

## What it means

The organization cannot be deleted while it still has connections, directories or live API keys. `param` counts what is left, for example `connections:0,directories:0,api_keys:1`, or names the table of another record that still refers to the organization. Revoked API keys and the organization's settings do not block the delete; they are removed with the organization.

## Likely causes

- The organization still has an SSO connection or a directory.
- An API key scoped to the organization has not been revoked.
- Another record still refers to the organization; `param` then names its table.

## How to fix it

### For developers

- Read `param`, delete each remaining connection and directory, and revoke each live API key, then retry the delete.
- If `param` names a table, remove those records first, or contact support if you cannot.

### For IT administrators

- Ask the app's team to remove the organization's connections and directories first.

## Example

HTTP status 409 when only an API key is left:

```json
{
  "error": {
    "type": "conflict",
    "code": "organization_not_empty",
    "message": "Delete the organization's API keys (revoke them) first; `param` counts what is left",
    "param": "connections:0,directories:0,api_keys:1",
    "doc_url": "https://docs.ohauthcat.com/errors/organization_not_empty",
    "request_id": "req_01J9Z3K5V7W8X9Y0Z1A2B3C4D5"
  }
}
```

## Developer message

The organization still has connections, directories or live API keys; delete or revoke them first (`param` lists what is left, e.g. `connections:2,directories:1,api_keys:1`, or names the table of another child). Revoked keys and the organization's settings are deleted with it

## IT administrator message

This organization still has connections or directories

## Translated IT administrator messages

The hosted portal shows these machine translations, which native speakers have not reviewed yet. Placeholders and identity provider console labels stay in English.

- `de`: <span lang="de" data-pagefind-ignore>Diese Organisation hat noch Verbindungen oder Verzeichnisse</span>
- `es`: <span lang="es" data-pagefind-ignore>Esta organización todavía tiene conexiones o directorios</span>
- `fr`: <span lang="fr" data-pagefind-ignore>Cette organisation a encore des connexions ou des annuaires</span>
- `ja`: <span lang="ja" data-pagefind-ignore>この組織にはまだ接続またはディレクトリがあります</span>
- `pt-BR`: <span lang="pt-BR" data-pagefind-ignore>Esta organização ainda tem conexões ou diretórios</span>
