---
metadata:
  - name: generator
    content: Diplodoc Platform v5.64.0
alternate:
  - https://yandex.ru/dev/api360/doc/ru/directory/patch-group-info.md
  - href: https://yandex.ru/dev/api360/doc/ru/directory/patch-group-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-group-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_idgroupsgroup_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 %}

{% note info "" %}

Для выполнения запроса требуется право `directory:write_groups`.

{% endnote %}

## 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}/groups/{group_id}
```

</div>

</div>

</div>

### Path parameters

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

_group_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": "team@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} `team@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": "Команда разработки",
  "type": "generic",
  "description": "Группа сотрудников отдела разработки.",
  "label": "development-team",
  "members_count": 12,
  "email": "team@example.com",
  "default_email": "team@example.com",
  "aliases": [
    "developers"
  ],
  "external_id": "group-123",
  "removed": false,
  "member_of": [
    {
      "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} `team@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} `team@example.com`
{.table-cell}
||
||

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

Произвольный внешний идентификатор группы.

_Example:_{.json-schema-reset .json-schema-example} `group-123`
{.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-team`
{.table-cell}
||
||

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

Родительские группы, в которые входит текущая группа.

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

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

{% endcut %}
{.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}
||
||

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

Признак удаленной группы: true — группа удалена; false — группа действующая.
{.table-cell}
||
||

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

Тип группы. Возможные значения:

- `generic` — стандартная группа, созданная одним из сотрудников организации. Пользователи могут изменять параметры такой группы и ее состав.
- `organization_admin` — группа администраторов организации. Неизменяемая техническая группа.
- `robots` — группа роботов. Неизменяемая техническая группа.
- `organization_deputy_admin` — группа менеджеров организации. Неизменяемая техническая группа."


_Example:_{.json-schema-reset .json-schema-example} `generic`
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### MemberOfItem {#entity-MemberOfItem}

Родительская группа, в которую входит текущая группа.

#|
|| **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 class="openapi-entity">

### MemberOf {#entity-MemberOf}

Родительские группы, в которые входит текущая группа.

**Type**: [MemberOfItem](#entity-MemberOfItem)[]

{% 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_idgroupsgroup_id-patch.md -->


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