---
title: "Delete Authentication Policy"
method: DELETE
path: "/authn/policies/{id}"
tags: ["Authentication Policies"]
---

# Delete Authentication Policy

`DELETE /authn/policies/{id}`

## Request

- Base URL: `https://console.jumpcloud.com/api/v2`
- URL: `https://console.jumpcloud.com/api/v2/authn/policies/{id}`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/jumpcloud/apis/jumpcloud-api-2/docs/authn/policies/:id/delete.ts> (a function with typed inputs; its response is checked against the schema)

Delete the specified authentication policy.

#### Sample Request
```
curl -X DELETE https://console.jumpcloud.com/api/v2/authn/policies/{id} \
  -H 'accept: application/json' \
  -H 'content-type: application/json' \
  -H 'x-api-key: {API_KEY}'
```

## Headers

- `x-org-id` string

## Response `200`

OK

- AuthnPolicy: This represents an authentication policy. See the details of each field for valid values and restrictions.
  - `id` string
  - `name` string
  - `description` string
  - `disabled` boolean
  - `monitorOnly` boolean
  - `managedBy` 'ORGANIZATION' | 'ENTERPRISE' | 'UNKNOWN': Policy ownership.
  - `orgId` string: Owning organization object id (hex). Populated on aggregate list rows.
  - `orgName` string: Live owning organization display name from organization metadata. Populated on aggregate list rows when managedBy is ORGANIZATION.
  - `effect` AuthnPolicyEffect
    - `action` 'allow' | 'deny' | 'unknown', required
    - `obligations` AuthnPolicyObligations
      - `mfa` object
        - `required` boolean
        - `interval` object: Optional MFA sign-in interval. Absent means every access.
          - `preset` string: 1h | 4h | 8h | 12h | 24h. Omit interval for every access.
          - `custom` object
            - `value` integer
            - `unit` string: hours | days
      - `userVerification` object
        - `requirement` 'none' | 'optional' | 'required'
      - `mfaFactors` object[]
        - `type` 'DURT' | 'WEBAUTHN' | 'PUSH' | 'DUO' | 'TOTP' | 'SMS_OTP'
    - `custom_error_message` AuthnPolicyCustomErrorMessage: Custom error message for an authentication policy.
      - `message` string, required: The custom error message to be displayed when the policy is applied.
      - `enabled` boolean, required: Indicates whether the custom error message is enabled or not.
      - `primary_help` AuthnPolicyHelpLink: Help link for an authentication policy.
        - `text` string: The text to be displayed for the help link.
        - `url` string: The URL to be opened when the help link is clicked.
      - `secondary_help` AuthnPolicyHelpLink: Help link for an authentication policy.
        - `text` string: The text to be displayed for the help link.
        - `url` string: The URL to be opened when the help link is clicked.
  - `targets` AuthnPolicyTargets
    - `excludedApplications` string[]: SSO application IDs to exclude when the policy applies to all applications (resources = [{ type: application }] with no id). Omitted or empty when targeting specific applications.
    - `resources` AuthnPolicyResourceTarget[]
      - `type` 'admin_portal' | 'user_portal' | 'application' | 'ldap', required
      - `id` string: Object ID of the resource target. If undefined, then all resources of the given type are targeted.
    - `userAttributes` AuthnPolicyUserAttributeTarget: User attribute targets are currently only supported for LDAP policies.
      - `exclusions` AuthnPolicyUserAttributeFilter[]
        - `field` string: The only field that is currently supported is ldap_binding_user
        - `operator` 'EQ'
        - `value` unknown
      - `inclusions` AuthnPolicyUserAttributeFilter[]
        - `field` string: The only field that is currently supported is ldap_binding_user
        - `operator` 'EQ'
        - `value` unknown
    - `userGroups` AuthnPolicyUserGroupTarget
      - `inclusions` string[]
      - `exclusions` string[]
    - `users` AuthnPolicyUserTarget
      - `inclusions` string[]
  - `type` 'user_portal' | 'application' | 'ldap' | 'admin_portal'
  - `conditions` object: Conditions may be added to an authentication policy using the following conditional language: ``` <conditions> ::= <expression> <expression> ::= <deviceEncrypted> | <deviceManaged> | <ipAddressIn> | <locationIn> | <notExpression> | <allExpression> | <anyExpression> <deviceEncrypted> ::= { "deviceEncrypted": <boolean> } <deviceManaged> ::= { "deviceManaged": <boolean> } <ipAddressIn> ::= { "ipAddressIn": [ <objectId>, ... ] } <locationIn> ::= { "locationIn": { "countries": [ <iso_3166_country_code>, ... ] } } <notExpression> ::= { "not": <expression> } <allExpression> ::= { "all": [ <expression>, ... ] } <anyExpression> ::= { "any": [ <expression>, ... ] } ``` For example, to add a condition that applies to IP addresses in a given list, the following condition can be added: ``` {"ipAddressIn": [ <ip_list_object_id> ]} ``` If you would rather exclude IP addresses in the given lists, the following condition could be added: ``` { "not": { "ipAddressIn": [ <ip_list_object_id_1>, <ip_list_object_id_2> ] } } ``` You may also include more than one condition and choose whether "all" or "any" of them must be met for the policy to apply: ``` { "all": [ { "ipAddressIn": [ <ip_list_object_id>, ... ] }, { "deviceManaged": true }, { "locationIn": { countries: [ <iso_3166_country_code>, ... ] } } ] } ```

## Other responses

- `400`: Bad Request
- `401`: Unauthenticated
- `403`: Unauthorized
- `404`: Not Found
- `409`: Conflict
- `500`: Internal Server Error

---

[API](https://skmtc.dev/jumpcloud/apis/jumpcloud-api-2.md) - [All operations](https://skmtc.dev/jumpcloud/apis/jumpcloud-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/jumpcloud/apis/jumpcloud-api-2/revisions/3f09fe63caaa?raw)
