Accessing Microsoft Teams using organizational or personal credentials
I had the same problem and none of these solutions worked for me. What did work was using my second phone. I opened the Microsoft authenticator on the first phone and when it asked me for my code, I accessed the Microsoft authenticator on the second phone and got the code. I then input the code on the first phone and everything was sorted!