If you join a new PC to Azure AD during the initial Windows 10 configuration, the device is listed under it's original name, e.g. DESKTOP-NNNNN. If the computer is then renamed (as is common practise), Azure AD is not updated. If one then needs the Bitlocker key (which is saved in AZ), then you're stuck unless you know the original name. This is a known problem.
Is there someway to find the Device Id from the PC? Somewhere in the registry or a PowerShell cmdlet?
Of course, if you're in a situation where the user has asked for their Bitlocker key, you're doubly stuffed because they won't be able to get to the desktop or PowerShell anyway! I've added recording the original name to our set-up procedure for new kit so this is more for laptops that have already been done.
I'm aware that the workaround is to set-up Windows using a local account, rename the computer, then add to Azure AD and then delete the local account. A faff but it's the best we've got so far.