OrgsNAC Rules

createOrgNacRule

POST
/api/v1/orgs/{org_id}/nacrules

Create a NAC authentication policy rule with match and not-match criteria, an allow or block action, optional result tags, and rule priority.

Authorization

Authorization<token>

Preferred authentication method for automation and integrations. Send the API token in the HTTP Authorization header.

Format: Authorization: Token {apitoken}

Notes:

  • An API token generated for a specific admin has the same privileges as that admin
  • An API token is automatically removed if it is not used for more than 90 days
  • SSO admins cannot generate admin API tokens. Use organization API tokens when scoped Org/Site privileges are needed.

In: header

Path Parameters

org_id*string
Formatuuid

Request Body

application/json

NAC authentication policy rule that matches request criteria and applies an allow or block action

action*nac_rule_action

Allow or block decision applied when the NAC rule matches

Value in

  • "allow"
  • "block"
apply_tags?array<string>

NAC tag IDs to include in the Access-Accept when the rule allows access

dry_run?boolean

Whether the NAC rule is in dry-run mode, where matches are logged but the action is not enforced

enabled?boolean

Whether the NAC rule is evaluated during policy matching

Defaulttrue
guest_auth_state?nac_rule_guest_auth_state

Guest portal authorization state condition for the rule. enum: authorized, unknown.

Value in

  • "authorized"
  • "unknown"
matching?

Criteria that must match for the NAC rule to apply

name*string

Human-readable name of the NAC rule

not_matching?

Criteria that must match for the NAC rule to apply

order?integer

Rule priority; lower values are evaluated with higher priority

Range0 <= value

Response Body

curl -X POST "https://example.com/api/v1/orgs/000000ab-00ab-00ab-00ab-0000000000ab/nacrules" \  -H "Content-Type: application/json" \  -d '{    "action": "allow",    "apply_tags": [      "c049dfcd-0c73-5014-1c64-062e9903f1e5\\""    ],    "matching": {      "auth_type": "eap-tls",      "nactags": [        "041d5d36-716c-4cfb-4988-3857c6aa14a2",        "a809a97f-d599-f812-eb8c-c3f84aabf6ba"      ],      "port_types": [        "wired"      ],      "site_ids": [        "bb19fc3e-4124-4b57-80d9-c3f6edce47c4",        "bb19fc3e-6564-4b57-80d9-c3f6edce47c1"      ],      "sitegroup_ids": [        "bb19fc3e-4124-4b57-80d9-c3f6edce47c4",        "bb19fc3e-6564-4b57-80d9-c3f6edce47c1"      ]    },    "name": "name1",    "not_matching": {},    "order": 1  }'
{  "action": "allow",  "apply_tags": [    "c049dfcd-0c73-5014-1c64-062e9903f1e5"  ],  "created_time": 0.1,  "dry_run": true,  "enabled": true,  "guest_auth_state": "authorized",  "id": "53f10664-3ce8-4c27-b382-0ef66432349f",  "matching": {    "auth_type": "eap-tls",    "family": [      "string"    ],    "mfg": [      "string"    ],    "model": [      "string"    ],    "nactags": [      "041d5d36-716c-4cfb-4988-3857c6aa14a2",      "a809a97f-d599-f812-eb8c-c3f84aabf6ba"    ],    "os_type": [      "string"    ],    "port_types": [      "wired"    ],    "site_ids": [      "bb19fc3e-4124-4b57-80d9-c3f6edce47c4",      "bb19fc3e-6564-4b57-80d9-c3f6edce47c1"    ],    "sitegroup_ids": [      "bb19fc3e-4124-4b57-80d9-c3f6edce47c4",      "bb19fc3e-6564-4b57-80d9-c3f6edce47c1"    ],    "vendor": [      "cisc"    ]  },  "modified_time": 0.1,  "name": "string",  "not_matching": {    "auth_type": "eap-tls",    "family": [      "string"    ],    "mfg": [      "string"    ],    "model": [      "string"    ],    "nactags": [      "041d5d36-716c-4cfb-4988-3857c6aa14a2",      "a809a97f-d599-f812-eb8c-c3f84aabf6ba"    ],    "os_type": [      "string"    ],    "port_types": [      "wired"    ],    "site_ids": [      "bb19fc3e-4124-4b57-80d9-c3f6edce47c4",      "bb19fc3e-6564-4b57-80d9-c3f6edce47c1"    ],    "sitegroup_ids": [      "bb19fc3e-4124-4b57-80d9-c3f6edce47c4",      "bb19fc3e-6564-4b57-80d9-c3f6edce47c1"    ],    "vendor": [      "cisc"    ]  },  "order": 1,  "org_id": "a97c1b22-a4e9-411e-9bfd-d8695a0f9e61"}