---
title: "Enable or disable a security feature for an organization"
method: POST
path: "/orgs/{org}/{security_product}/{enablement}"
tags: ["orgs"]
deprecated: true
---

# Enable or disable a security feature for an organization

`POST /orgs/{org}/{security_product}/{enablement}`

> **Deprecated.**

> [!WARNING]
> **Closing down notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is closing down. Please use [code security configurations](https://docs.github.com/enterprise-cloud@latest/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-of-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/).

Enables or disables the specified security feature for all eligible repositories in an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."

The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the `admin:org`, `write:org`, or `repo` scopes to use this endpoint.

## Path parameters

- `org` string, required
- `security_product` 'dependency_graph' | 'dependabot_alerts' | 'dependabot_security_updates' | 'advanced_security' | 'code_scanning_default_setup' | 'secret_scanning' | 'secret_scanning_push_protection', required
- `enablement` 'enable_all' | 'disable_all', required

## Request body

- object
  - `query_suite` 'default' | 'extended' — CodeQL query suite to be used. If you specify the `query_suite` parameter, the default setup will be configured with this query suite only on all repositories that didn't have default setup already configured. It will not change the query suite on repositories that already have default setup configured. If you don't specify any `query_suite` in your request, the preferred query suite of the organization will be applied.

## Response `204`

Action started

## Other responses

- `422` — The action could not be taken due to an in progress enablement, or a policy is preventing enablement

---

[API](https://skmtc.net/github/apis/ghec.md) · [All operations](https://skmtc.net/github/apis/ghec/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/ghec/revisions/8ae6d0c8716e/schema)
