Hi Mohammed Ahmed,
The error The DS has corrupt data: rIDAvailablePool value is not valid indicates that the cloud domain controller (the current RID master) has a corrupted RID pool in its database. This is likely due to replication conflicts or an improper FSMO role seizure during the transition.
First, verify the RID master role is indeed on the cloud DC and that it can contact itself. Run:
text
netdom query fsmo
Ensure the RID Pool Manager role lists the cloud DC. Then, check replication from the cloud DC's perspective using:
text
repadmin /replsummary
Look for failures, especially regarding the Schema or Domain partitions. If replication is failing, you must resolve that first.
To repair the RID pool, begin with an authoritative restore of the RID pool on the cloud DC. Open an elevated Command Prompt and execute:
text
dcdiag /fix
This will attempt to auto-correct inconsistencies. If that fails, you can manually reset the RID pool via the registry, but this is a sensitive operation. On the cloud DC, open regedit and navigate to HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Parameters. Backup the key, then delete the values RID Available Pool and RID Next RID. Restart the NTDS service or reboot the server. Upon restart, the DC will request a new RID pool from itself as the RID master, effectively resetting the pool.
Before taking this step, ensure the on-prem DC is online and replicating correctly to avoid SID duplication. After resetting, monitor Event ID 16650 (successful RID pool allocation) and test creating a new user object. Run dcdiag /test:ridmanager /v again to confirm the error is resolved.
Do not demote and re-promote the cloud DC unless absolutely necessary, as this will cause significant disruption. If the manual registry fix doesn't work, consider seizing the RID master role back to the on-prem DC temporarily, then transferring it cleanly back to the cloud DC after ensuring replication is healthy.
I hope you've found something useful here. If it helps you get more insight into the issue, it's appreciated to ACCEPT ANSWER then. Should you have more questions, feel free to leave a message. Have a nice day!
VPHAN