Skip to content

Delete Access Control Rule

← HTTP API reference
View source specification ↗
DELETE /{namespace}/{principalType}/{principalId}/access-control-rules/{ruleId}

Delete an access control rule.

Requires a signed user/session or the existing authenticated client flow. The anonymous DCR delegated device profile cannot invoke this operation.

Required scope

Any authenticated access token

Path parameters

namespacestringRequired

The namespace of the principal

principalTypestringRequired

The type of principal

principalIdstringRequired

The ID of the principal

ruleIdstringRequired

The ID of the access control rule to delete

Query parameters

reasonstring

Optional operator-supplied reason recorded in the audit log for this deletion.

maxLength: 500

Header parameters

If-Matchstring

Optional quoted etag of the rule as last read (its `etag` field). When present the deletion applies only if it still matches the rule's current etag, otherwise 412 PRECONDITION_FAILED; `*` requires the rule to exist. Omitted, the deletion is unconditional.

minLength: 1

Returns

200

Access control rule deleted successfully

No response body.

Errors

400

Invalid request payload

Check the request fields and any validation details, then correct the payload.

412 PRECONDITION_FAILED

The If-Match etag does not match the current access control rule; re-read the rule and retry

Inspect the returned code and family and follow the error handling guide.

500

Internal server error

Retry with backoff only when the operation is safe to repeat. Include the error code when reporting persistent failures.