ERROR_CANT_DISABLE_MANDATORY - 1310 (0x51E)
The group may not be disabled.
Updated: Feb 21, 2026
Technical Background
The ERROR_CANT_DISABLE_MANDATORY error code is a specific permission-related error that occurs when an attempt is made to disable or remove a mandatory group from the system. This error indicates that the operation cannot proceed due to security constraints.
Error Details
- Error Name: ERROR_CANT_DISABLE_MANDATORY
- Numeric Code: 1310 (0x51E)
- Short Description: The group may not be disabled.
This error typically arises when an application or system process attempts to modify the membership of a mandatory security group, which is defined by the operating system and cannot be altered. Mandatory groups are used to enforce certain security policies and ensure that specific user rights and privileges are maintained across the system.
Common Causes
- Invalid Parameter Values: The operation attempted to disable a mandatory group, but the group in question is not modifiable due to its nature as a mandatory group.
- Incorrect Object Type: The object being targeted for modification was incorrectly identified or classified as a non-modifiable entity.
- Exceeding Limits: There may be system-wide limits on the number of groups that can be modified, and attempting to disable a mandatory group has exceeded this limit.
Real-World Context
Mandatory groups are often used in scenarios where security policies need to be enforced across multiple applications or processes. Disabling such groups could potentially compromise system integrity and security. Therefore, the operating system enforces strict controls over these groups to prevent unauthorized modifications.
Is This Error Critical?
The criticality of this error depends on the context in which it occurs. If an application is attempting to disable a mandatory group as part of its normal operation, this could indicate a misconfiguration or a security concern that needs to be addressed. However, if the error arises unexpectedly during system maintenance or troubleshooting, it may point to a deeper issue with the system's security configuration.
How to Diagnose
- Review Operation Context: Verify the context in which the operation was attempted. Ensure that the group being targeted is not a mandatory group and can be modified as intended.
- Validate Parameters: Check the parameters passed to the API or command used to modify the group membership. Ensure they are correct and appropriate for the operation.
- Confirm Object Types: Confirm that the object types involved in the operation are correctly identified and classified by the system. Mandatory groups should be recognized as such and not modifiable through standard operations.
- Verify Input Data: Validate any input data or configuration settings related to group management. Ensure they align with the expected behavior of mandatory groups.
How to Resolve
- Correct Parameter Usage: If the error is due to incorrect parameters, ensure that the correct values are used when modifying group membership.
- Adjust Operation Context: Modify the operation context if necessary to avoid attempting to disable a mandatory group. This may involve changing the application's logic or adjusting system policies.
- Restore Data: In cases where data corruption might be a factor, restore any affected data and reattempt the operation with valid inputs.
- Retry Operation with Valid Inputs: If the issue is due to temporary conditions, retry the operation after ensuring all parameters are correctly set.
Developer Notes
When working with group management in Windows applications, it is crucial to understand the nature of mandatory groups and their role in enforcing security policies. Developers should consult the official Microsoft documentation for detailed information on managing groups and permissions in a secure manner.
Related Errors
- ERROR_GROUP_MUST_BE_LOCAL: Indicates that a local group operation was attempted on a domain controller.
- ERROR_GROUP_NOT_EMPTY: Occurs when an attempt is made to delete a group with members.
- ERROR_INVALID_PARAMETER: General error indicating invalid parameters were passed to the function.
FAQ
Q: What does the ERROR_CANT_DISABLE_MANDATORY error mean?
A: This error indicates that an attempt was made to disable or remove a mandatory security group, which is not allowed due to system constraints.
Q: How can I avoid this error in my application?
A: Ensure that you correctly identify and handle mandatory groups. Avoid attempting to modify these groups directly unless explicitly permitted by the operating system.
Q: Can this error occur during normal operation of a Windows application?
A: Yes, if your application attempts to disable a mandatory group as part of its functionality, it may encounter this error. Ensure that such operations are handled appropriately in your code.
Summary
The ERROR_CANT_DISABLE_MANDATORY error is a specific permission-related issue that occurs when an attempt is made to modify a mandatory security group. This error highlights the importance of understanding and respecting system-defined constraints on certain groups to maintain security and stability.