Hello Randeep,
Since the VM was migrated to Azure, the issue is likely related to RDS licensing configuration, license server connectivity, or CAL migration rather than Windows activation. First, open Server Manager > Tools > Remote Desktop Services > RD Licensing Manager and verify that the license server is activated and the CAL packs are installed. If the server is not activated, right-click it, select Activate Server, and complete the activation wizard. If the CALs were installed on the original server, use Manage Licenses > Migrate RDS CALs to transfer them through the supported migration process.
Next, open gpedit.msc and navigate to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Licensing. Enable Use the specified Remote Desktop license servers and enter the correct license server hostname or FQDN, then configure Set the Remote Desktop licensing mode to match your CAL type (Per User or Per Device). Verify network connectivity between the Azure VM and license server, particularly outbound TCP 443 if using Web-based activation or tunneling restrictions. Run RD Licensing Diagnoser to identify licensing configuration or connectivity errors.
Could you confirm the Windows Server versions, CAL type, whether the original license server is still accessible, and the exact message displayed when installing the CALs?
I hope you've found something useful here. If it helps you get more insight into the issue, it's appreciated to accept the answer. Should you have more questions, feel free to leave a message. Have a nice day!
HP.