## connected-apps delete

Disconnect app.

Also: `machinemail connected-apps rm`.

Revokes the grant: its refresh token and every access token issued from it stop working immediately (401 on /mcp and /v0). Returns the grant as it was. Requires an organization-scoped credential with api_key_delete.

### shell

```
machinemail connected-apps delete <grant-id> [flags]
```

### Arguments

| Field       | Description                             |
|-------------|-----------------------------------------|
| `<grant-id>`| `string` Required ID of the grant (oag_...).|

### Examples

### shell

```
machinemail connected-apps delete <grant-id>
```

### API

- [`DELETE /v0/oauth-grants/{grant_id}`](/content/docs/reference/api/connected-apps#disconnect-app/index.html)

## connected-apps list

List connected apps.

Also: `machinemail connected-apps ls`.

Apps and MCP clients people in the organization connected with OAuth. Requires an organization-scoped credential with api_key_read; pod, inbox and sandbox credentials get 403.

### shell

```
machinemail connected-apps list [flags]
```

### Flags

| Field                | Description                                                 |
|----------------------|-------------------------------------------------------------|
| `--limit <n>`       | `integer` Maximum number of items to return. Default 50, maximum 500; larger values are capped. Default `50` |
| `--page-token <value>`| `string` next_page_token from the previous page.         |
| `--ascending`        | `boolean` Sort oldest first.                               |
| `--all`             | `boolean` Follow next_page_token and return every page.   |

### Examples

### shell

```
machinemail connected-apps list
machinemail connected-apps list --all --json | jq '.oauth_grants | length'
```

### API

- [`GET /v0/oauth-grants`](/content/docs/reference/api/connected-apps#list-connected-apps/index.html)
