ERROR_DS_CANT_ON_NON_LEAF - 8213 (0x2015)
The directory service can perform the requested operation only on a leaf object.
Updated: Feb 21, 2026
Technical Meaning
The error code ERROR_DS_CANT_ON_NON_LEAF indicates that a requested operation can only be performed on a leaf object within the directory service. A leaf object is an object at the bottom level of a tree structure, meaning it does not have any child objects.
Error Details
This error typically arises when attempting to perform operations such as adding or modifying attributes in a non-leaf node (a node that has subordinates) within the directory service. The operation can only be performed on leaf nodes because they are terminal points in the hierarchy and do not have any further substructure.
Usage Context
This error is relevant to developers working with Active Directory or other directory services where hierarchical structures are used to organize objects. It highlights a limitation in the operations that can be executed within this structure, specifically targeting leaf nodes as the valid targets for certain actions.
Developer Interpretation
When encountering ERROR_DS_CANT_ON_NON_LEAF, developers should ensure that their operations are targeted at leaf objects rather than non-leaf nodes. This error serves as a reminder to validate the object types before performing specific operations, particularly those that require terminal points in the hierarchy.
Related Errors
ERROR_DS_OBJECT_IS_GROUP(0x2018): Indicates an operation cannot be performed on a group object.ERROR_DS_NO_TREE_OP(0x2035): Denotes that tree operations are not supported or applicable to the current context.
FAQ
Q: What does ERROR_DS_CANT_ON_NON_LEAF mean?
A: This error indicates that an operation can only be performed on a leaf object within the directory service hierarchy, and it was attempted on a non-leaf node.
Q: How can I resolve this issue?
A: Ensure that your operations are targeted at leaf objects. Verify the object types before performing specific actions to avoid encountering this error.
Summary
ERROR_DS_CANT_ON_NON_LEAF is an error code indicating that a requested operation can only be performed on a leaf object within the directory service hierarchy. Developers should ensure their operations target appropriate nodes and validate object types to prevent this error.