---
metadata:
  - name: generator
    content: Diplodoc Platform v5.64.0
alternate:
  - https://yandex.ru/dev/api360/doc/ru/directory/patch-department-info.md
  - href: https://yandex.ru/dev/api360/doc/ru/directory/patch-department-info.md
    type: text/markdown
    title: Markdown version
  - href: https://yandex.ru/dev/api360/doc/ru/llms.txt?revision=r21934284
    rel: describedby
sourcePath: docs/dev/api360/concepts/gw/directory/patch-department-info.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/api360/doc/ru/llms.txt?revision=r21934284

<!-- source: ru/openapi/v1directoryorganizationsorg_iddepartmentsdepartment_id-patch.md -->
<div class="openapi">

# Изменение статуса 2FA для подразделения

<!-- markdownlint-disable-file -->

Изменяет статус обязательной двухфакторной аутентификации для подразделения. Чтобы изменить остальные параметры, воспользуйтесь запросом «Изменить параметры подразделения» на хост на хост `api360.yandex.net`.

Отправить запрос может администратор организации или сотрудник с ролью **Менеджер пользователей**.


{% note tip "" %}

Этот инструмент доступен в тарифах для крупных организаций **Корпоративный + Безопасность** и **Корпоративный Максимум**. Чтобы узнать подробности, оставьте заявку: менеджер Яндекс 360 свяжется с вами, ответит на все вопросы и поможет с подключением. [Оставить заявку](https://forms.yandex.ru/surveys/13738802.99a3500a5b3c9b59ead425e5c11155ed6b45516d/)

{% endnote %}


Метод актуален, если:
- В организации установлена двухфакторная аутентификация через [сервис для управления 2FA с возможностью персональной настройки](https://yandex.ru/dev/api360/doc/ru/authentication/index) или в интерфейсе Кабинета организации.
- Режим двухфакторной аутентификации `enforcement_mode: per_user` — только отдельным сотрудникам. Узнать режим, который установлен для 2FA в вашей организации, можно с помощью метода, описанного в разделе [Посмотреть статус 2FA с возможностью персональной настройки](https://yandex.ru/dev/api360/doc/ru/authentication/get-2fa).

{% cut "Особенности обязательной 2FA для подразделения" %}

**На кого распространяется**

 
:   Статус 2FA действует только на участников подразделения с аккаунтами на домене организации:
  - Начинает действовать при вступлении сотрудника в подразделения.
  - Перестает действовать после удаления сотрудника из подразделения.
  - Не распространяется на вложенные подразделения — для них нужно задавать статус отдельно.

**Как работает с персональной 2FA**

 
:   Статус 2FA для подразделения не изменяет персональную настройку 2FA у сотрудников:
  - Если для подразделения установлено `is_2fa_enabled=true`, сотрудники будут обязаны проходить 2FA.
  - При этом методы, возвращающие персональный статус 2FA, по-прежнему будут показывать `is_2fa_enabled=false` для этих сотрудников.

**Правила применения 2FA**

 
:   Сотрудник обязан проходить 2FA, если хотя бы один из параметров `is_2fa_enabled` имеет значение `true`:
  - Персональная настройка 2FA.
  - Настройка 2FA для подразделения.
  - Настройка 2FA хотя бы для одной из групп, в которых состоит сотрудник.

{% endcut %}


## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-patch);margin-bottom: 12px">

<div class="openapi__request">

PATCH {.openapi__method}
```text translate=no
https://cloud-api.yandex.net/v1/directory/organizations/{org_id}/departments/{department_id}
```

</div>

</div>

</div>

### Path parameters

#|
|| **Name** | **Description** ||
||

_department_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Идентификатор подразделения.
{.table-cell}
||
||

_org_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Идентификатор организации.
{.table-cell}
||
|#{.json-schema-properties}

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "default_email": "department@example.com",
  "is_2fa_enabled": true
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_default_email_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Адрес, используемый по умолчанию.

_Example:_{.json-schema-reset .json-schema-example} `department@example.com`
{.table-cell}
||
||

_is_2fa_enabled_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean

Статус обязательной двухфакторной аутентификации для подразделения.

Возможные значения:

- `true` — включена;
- `false` — выключена.

{.table-cell}
||
|#{.json-schema-properties}

</div>

## Responses

<div class="openapi__response__code__200">

## 200 OK

Параметры подразделения изменены.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "id": 7654321,
  "name": "Отдел разработки",
  "description": "Подразделение продуктовой разработки.",
  "label": "development",
  "members_count": 25,
  "email": "department@example.com",
  "default_email": "department@example.com",
  "aliases": [
    "developers"
  ],
  "removed": false,
  "parent": {
    "id": 7654322
  },
  "created_at": "2026-05-01T10:00:00+00:00",
  "is_2fa_enabled": true
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_aliases_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string[]

Алиасы почтовых рассылок подразделения.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  "developers"
]
```

{% endcut %}
{.table-cell}
||
||

_created_at_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Дата и время создания подразделения.

_Example:_{.json-schema-reset .json-schema-example} `2026-05-01T10:00:00+00:00`
{.table-cell}
||
||

_default_email_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Адрес, используемый по умолчанию.

_Example:_{.json-schema-reset .json-schema-example} `department@example.com`
{.table-cell}
||
||

_description_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Описание подразделения.

_Example:_{.json-schema-reset .json-schema-example} `Подразделение продуктовой разработки.`
{.table-cell}
||
||

_email_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Адрес рассылки, по которому будут отфильтрованы подразделения.

_Example:_{.json-schema-reset .json-schema-example} `department@example.com`
{.table-cell}
||
||

_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Идентификатор подразделения.
{.table-cell}
||
||

_is_2fa_enabled_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean

Статус обязательной двухфакторной аутентификации для подразделения.

Возможные значения:

- `true` — включена;
- `false` — выключена.

{.table-cell}
||
||

_label_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Имя почтовой рассылки подразделения.

_Example:_{.json-schema-reset .json-schema-example} `development`
{.table-cell}
||
||

_members_count_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Количество сотрудников подразделения с учетом вложенных подразделений.
{.table-cell}
||
||

_name_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Название подразделения.

_Example:_{.json-schema-reset .json-schema-example} `Отдел разработки`
{.table-cell}
||
||

_parent_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [Parent](#entity-Parent)

Родительское подразделение.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 7654322
}
```

{% endcut %}
{.table-cell}
||
||

_removed_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean

Признак удаленного подразделения:

- `true` — подразделение удалено;
- `false` — подразделение действующее.

{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### Parent {#entity-Parent}

Родительское подразделение.

#|
|| **Name** | **Description** ||
||

_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Идентификатор родительского подразделения.
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 7654322
}
```

{% endcut %}

</div>

</div>

<div class="openapi__response__code__403">

## 403 Forbidden

Доступ к ресурсу запрещен. У пользователя или приложения недостаточно прав.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "error": "forbidden",
  "description": "Forbidden",
  "message": "Forbidden",
  "details": {}
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_description_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Техническое описание ошибки.

_Example:_{.json-schema-reset .json-schema-example} `Forbidden`
{.table-cell}
||
||

_error_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Код ошибки

_Example:_{.json-schema-reset .json-schema-example} `forbidden`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Сообщение об ошибке.

_Example:_{.json-schema-reset .json-schema-example} `Forbidden`
{.table-cell}
||
||

_details_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**Type**: object" %}

#|
|#{.json-schema-properties}

{% endcut %}

Дополнительные детали ошибки

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__404">

## 404 Not Found

Запрашиваемый ресурс не найден.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "error": "not_found",
  "description": "Not found",
  "message": "Not found",
  "details": {}
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_description_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Техническое описание ошибки.

_Example:_{.json-schema-reset .json-schema-example} `Not found`
{.table-cell}
||
||

_error_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Код ошибки

_Example:_{.json-schema-reset .json-schema-example} `not_found`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Сообщение об ошибке.

_Example:_{.json-schema-reset .json-schema-example} `Not found`
{.table-cell}
||
||

_details_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**Type**: object" %}

#|
|#{.json-schema-properties}

{% endcut %}

Дополнительные детали ошибки

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__422">

## 422 Unprocessable Entity

Возможные ошибки:

- Feature unavailable
- Invalid data

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "error": "feature_unavailable",
  "description": "Feature unavailable",
  "message": "Feature unavailable",
  "details": {}
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_description_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Техническое описание ошибки.

_Example:_{.json-schema-reset .json-schema-example} `Feature unavailable`
{.table-cell}
||
||

_error_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Код ошибки

_Example:_{.json-schema-reset .json-schema-example} `feature_unavailable`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Сообщение об ошибке.

_Example:_{.json-schema-reset .json-schema-example} `Feature unavailable`
{.table-cell}
||
||

_details_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**Type**: object" %}

#|
|#{.json-schema-properties}

{% endcut %}

Дополнительные детали ошибки

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

</div>
<!-- endsource: ru/openapi/v1directoryorganizationsorg_iddepartmentsdepartment_id-patch.md -->


[*Deprecated]: No longer supported, please use an alternative and newer version.