[comment]: # ({f61ef399-f9e8f670})
# userdirectory.delete

[comment]: # ({/f61ef399-f9e8f670})

[comment]: # ({9833a850-b5ff62ed})
### 説明

`object userdirectory.delete(array userDirectoryIds)`

このメソッドでは、ユーザーディレクトリを削除できます。ユーザーディレクトリが少なくとも1つのユーザーグループで直接使用されている場合、そのユーザーディレクトリは削除できません。<br>
デフォルトのLDAPユーザーディレクトリは、`authentication.ldap_configured` が 1 に設定されている場合、または残っているユーザーディレクトリが複数ある場合は削除できません。

::: noteclassic
このメソッドは、*Super admin* ユーザータイプでのみ使用できます。
:::

[comment]: # ({/9833a850-b5ff62ed})

[comment]: # ({1e1862ff-90e6a45f})
### パラメータ

`(array)` 削除するユーザーディレクトリのID。

[comment]: # ({/1e1862ff-90e6a45f})

[comment]: # ({71d313b7-e48d17a6})
### 戻り値

`(object)` `userdirectoryids`プロパティの下にある削除されたユーザーディレクトリのIDを含むオブジェクトを返します。

[comment]: # ({/71d313b7-e48d17a6})

[comment]: # ({b41637d2-94dc6263})
### 例

[comment]: # ({/b41637d2-94dc6263})

[comment]: # ({93ba09bc-ec4f71a7})
#### 複数のユーザーディレクトリの削除

2つのユーザーディレクトリを削除します。

[リクエスト](/manual/api#performing-requests) :

```json
{
    "jsonrpc": "2.0",
    "method": "userdirectory.delete",
    "params": [
        "2",
        "12"
    ],
    "id": 1
}
```

レスポンス :

```json
{
    "jsonrpc": "2.0",
    "result": {
        "userdirectoryids": [
            "2",
            "12"
        ]
    },
    "id": 1
}
```

[comment]: # ({/93ba09bc-ec4f71a7})

[comment]: # ({7d9028d5-1eee2f52})
### ソース

CUserDirectory::delete() in *ui/include/classes/api/services/CUserDirectory.php*.

[comment]: # ({/7d9028d5-1eee2f52})
