I've had the same issue. Except sometimes the mic works but there is no audio output. I have found when you go to device settings, if you set the mic and the audio output to "default device" then they both work.
However "default device" does not always show up as an option. And the only thing I know that sometimes makes it work is to either restart teams, or to restart your pc. Again this only sometimes works.
I am not sure why teams doesn't always detect the same devices.