ERROR_DS_CANT_MOD_PRIMARYGROUPID 0x8007213A

Error code 8506 · HRESULT 0x8007213A

WINDOWS

Cannot change the primary group ID of a domain controller account.

Windows troubleshooting diagram: Device Manager warning and a system file scan
Windows errors: check drivers, system files and Event Viewer, in that order.

What it means

ERROR_DS_CANT_MOD_PRIMARYGROUPID is a Windows error code (system error 8506, returned as HRESULT 0x8007213A) reported by Windows. Its official message is: “Cannot change the primary group ID of a domain controller account.”

How to fix ERROR_DS_CANT_MOD_PRIMARYGROUPID

  1. Reboot once — many one-off system codes disappear with a clean restart
  2. Repair system files: 'sfc /scannow' then 'DISM /Online /Cleanup-Image /RestoreHealth'
  3. Find the source in Event Viewer → System: filter for this exact code and open its provider link

Related errors

Source: Microsoft WinError.h

Last updated: