I just got my problem resolved with the help of Microsoft Azure support.
The .rdp file you can download from Azure when you try to connect to the virtual machine contains the setting
administrative session:i:1
This is equivalent to calling mstsc with the /admin switch.
In this mode, the microphone is not being mapped.
After changing the 1 to 0, microphone redirection worked immediately.
So for reference purpose here are the complete requirements you need to get audio recording inside an RDP session:
- Remote Desktop Session Host role is installed
- On a server < 2016, the Desktop Experience feature is installed. Windows Server 2016 already contains this feature (unless you have a core installation, of course)
- You're either still inside the grace period OR have the Remote Desktop Licensing role installed and a valid CAL
- The remote desktop group policy allows audio recording
- The .rdp file contains
audiocapturemode:i:1
("Record audio from this machine" is checked)
- The RDP session has NOT been started as an admin session (using /admin or the
administrative session:i:1
entry)
With these settings, audio playback and recording should work inside an RDP session.