Hello @Marco Milone , thank you for reaching out. It looks like this seemed to be an issue that got addressed lately as mentioned here: https://feedback.azure.com/forums/169401-azure-active-directory/suggestions/12980892-machine-rename-azure-ad#{toggle_previous_statuses}
But also users have complained that they are still seeing the issue of the devices renamed on-prem not reflecting in AAD, but all the versions mentioned were old Windows 10 versions.
It would be great to know which Windows 10 version you are using and if its a Lower Window Version i.e lower than 1903, can you give it a try with the latest versions of Windows 10 and check if that works.
If it still fails, I would recommend you to unjoin the machine from AAD and then rejoin it. You can use the commands listed below:
- Download the PSExec tool and open the cmd.exe from withing the PSExec tool. You can do that by running the following command:
psexec.exe –i –s cmd.exe
- Type in
dsregcmd /leave
and this command should unjoin your machine from AAD. - Rename the machine
- Then try to rejoin the machine back to AAD and check if that helps.
Hope the above response helps.
Do let us know if this helps and if there are any more queries around this, please do let us know so that we can help you further. Also, please do not forget to accept the response as an Answer; if the above response helped in answering your query.