Hi,
The error occurs because RDS CALs are version‑locked: Windows Server 2016 RDS CALs cannot be installed on a Windows Server 2012 R2 license server. The license server must be at least the same version as the CALs you are trying to register, or newer. In your case, the 2012 R2 license server simply does not recognize 2016 CALs, which is why the code is rejected even though it is correct.
To resolve this, you need to upgrade your Remote Desktop Licensing server to Windows Server 2016 or later, then install the 2016 User CALs there. Once the CALs are registered on a 2016 license server, they can issue licenses to 2016 RDS session hosts. There is no supported method to back‑port newer CALs to an older license server. If you must keep 2012 R2 as the host OS, you will need to obtain 2012 R2 CALs instead. This is a strict Microsoft licensing requirement, not a technical misconfiguration.
Let me know you need further assistant, please feel free to hit accept answer if you find this information helpful to you.
Harry.